waynew Posted July 8, 2008 Share Posted July 8, 2008 Okay, I've been googling high and low for an answer to this. There is plenty of documentation out there for unserialize() etc, but there seems to be nothing out there that actually tells you what a serialized variable is? Anyone know what a serialized variable is? Thanks. Link to comment https://forums.phpfreaks.com/topic/113693-serialized-variables/ Share on other sites More sharing options...
Wolphie Posted July 8, 2008 Share Posted July 8, 2008 It generates a storable representation of a value. http://uk3.php.net/manual/en/function.serialize.php Look harder next time. www.php.net Link to comment https://forums.phpfreaks.com/topic/113693-serialized-variables/#findComment-584270 Share on other sites More sharing options...
sasa Posted July 8, 2008 Share Posted July 8, 2008 string Link to comment https://forums.phpfreaks.com/topic/113693-serialized-variables/#findComment-584318 Share on other sites More sharing options...
mbeals Posted July 8, 2008 Share Posted July 8, 2008 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.