Posted by Mara Guida on 10/09/59 11:36
yawnmoth wrote:
> Obviously, "\9" equals chr(9), but what would equal chr(90)? "\90"
> doesn't. Rather, "\90" seems to be equal to chr(9).chr(0). So what
> could I do to get chr(90) using escaped numbers?
You can't do it with numbers in base 10.
You can do it with numbers in base 8 or 16.
http://www.php.net/manual/en/language.types.string.php
$s_b16 = "\x5a";
$s_b8 = "\132";
$s_90 = chr(90);
/* all these strings are equal */
$s_x90 = "\90";
$s_d90 = chr(9*16+0); /* chr(144) */
Navigation:
[Reply to this message]
|