I got it.

<?php
for ( $i = 0; $i <= 255; $i++ )
{
        $Dictionary[] = sprintf("%c",$i);
}
?>

======= 2004-02-25 18:00:06 =======

>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
>

= = = = = = = = = = = = = = = = = = = =
                                 
        Meteorlet Woody
[EMAIL PROTECTED]
          2004-02-25

Reply via email to