RE: [PHP] Serialize/Unserialize
| From: | Myke Hines | Date: | Tue, 14 Nov 2000 18:25:10 +0000 |
| Subject: | RE: [PHP] Serialize/Unserialize | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-25215@lists.php.net to get a copy of this message | ||
ya this is alittle funky...
you would do this..
$host_key = array( "$HOSTNAME" );
$host_key = urlencode( serialize( $host_key ));
echo "HostKey: $host_key<br><br>\n";
$host_name = unserlialize(urldecode( $host_key ));
-----Original Message-----
From: Boget, Chris [mailto:Chris.Boget@wild.net]
Sent: Tuesday, November 14, 2000 9:56 AM
To: PHP (E-mail)
Subject: [PHP] Serialize/Unserialize
My brain must be mush today. Something this simple
I just cannot figure out and I'm beating my head against
the wall (under a time crunch no less).
Why isn't this working?
$host_key = array( "$HOSTNAME" );
$host_key = urlencode( serialize( $host_key ));
echo "HostKey: $host_key<br><br>\n";
$host_name = urldecode( unserialize( $host_key ));
$host_key has a value but after processing, $host_name is coming
up blank...
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net