Jump to content

Serialized variables?


waynew

Recommended Posts

basically, you can't store a complex data structure, like an array in a database or pass it across a socket, so you have to transform it into something 'flat'.  serialize() takes that complex data structure and encodes it into a string that can be decoded by unserialize.

 

To see what it is doing just echo some serialized arrays

 

$array1 = array("1","2","3");
$array2 = array("1"=>"one", "2"=>"two", "3"=>"three");

echo serialize($array1);
echo serialize($array2);

Link to comment
https://forums.phpfreaks.com/topic/113693-serialized-variables/#findComment-584351
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.