Hi
Would try
<?php
for ($i = 0; $i <=255; $i++)
Dictionary[] = "\x" . str_pad(dechex($i), 2, "0", ,
STR_PAD_LEFT));
?>
/Jesper
-----Ursprungligt meddelande-----
Fr�n: Meteorlet Woody [mailto:[EMAIL PROTECTED]
Skickat: den 25 februari 2004 11:00
Till: php-windows
�mne: [PHP-WIN] Character Problem
Hi,everyone!
When I want to create a character dictionary,I meet a problem.
The problem is that how to put the characters (256 ASCII,including
nonprintable) in an array in one loop.
I can do like this:
<?php
Dictionary[] = "\x00";
Dictionary[] = "\x01";
......
Dictionary[] = "\xFF";
?>
But when I want to do by using loop,it doesn't work.
<?php
for ( $i = 0; $i <=255; $i++ )
Dictionary[] = "\x$i"; // it doesn't work!!!
?>
Is there anyone who has any idea or hint to solve this problem? Thank
you so much in advance.
Meteorlet
[EMAIL PROTECTED]
2004/2/25
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php