FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » converting numbers to ascii values
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: converting numbers to ascii values [message #183906 is a reply to message #183889] Mon, 25 November 2013 03:40 Go to previous message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma:
Senior Member
On Sun, 24 Nov 2013 11:58:34 -0500, richard wrote:

> In BASIC I would run a for loop to print out the corresponding
> characters for a given value.
>
> for x=65 to 90 print chr$(x)
> next x
>
> would give ABCDEF......
>
> how is this done in php?

Using a combination of the following:

http://php.net/manual/en/control-structures.for.php
http://us3.php.net/chr
http://us3.php.net/print

Or in other words, just about the same way it is in basic, but using the
equivalent php control structures and functions instead.

--
Denis McMahon, denismfmcmahon(at)gmail(dot)com
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: PHP functions to convert markup efficiently
Next Topic: creating key / hash
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Sep 19 01:51:16 GMT 2024

Total time taken to generate the page: 0.04661 seconds