Re: sending a hex string as it is?
| From: | DvDmanDT | Date: | Wed, 28 Jan 2004 20:03:35 +0000 |
| Subject: | Re: sending a hex string as it is? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-176112@lists.php.net to get a copy of this message | ||
Did you consider following?
$var="\x10"; ? Or dechex();?
--
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
"Khoa Nguyen" <KNguyen@MEGISTO.com> skrev i meddelandet
news:AD3C7008DB448D42ABA9346FE715E8340D331C@megisto-e2k.megisto.com...
Thanks for the info Dave, but I still can't make it work:
<?php
$var = 0x10; // decimal 16
echo $var; // case 1
echo strval($var); // case 2
?>
In both cases, I see 3136 (ASCII encoded of string "16") on the wire :-(
Any ideas?
Khoa
-----Original Message-----
From: David OBrien [mailto:dobrien@naccrra.org]
Sent: Wednesday, January 28, 2004 2:08 PM
To: Khoa Nguyen; php-general@lists.php.net
Subject: Re: [PHP] sending a hex string as it is?
At 02:03 PM 1/28/2004, Khoa Nguyen wrote:
>$var = 0x8180;
>
>How do I send $var to the browser as it is? In other words, if sniffing
>on the wire, I should see 8180, not 38 31 38 30.
I think
http://www.php.net/manual/en/function.strval.php
would work here
-Dave
>Thanks for your help.
>Khoa
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php