PDA

View Full Version : Serialize with ID


SmEdD
04-11-2004, 07:02 PM
How can you serialize something and give it an ID as if it was like inserting a new row.
$maps['mapid'] = ; // I need a value here!
$maps['title'] = $title;
serialize($maps);

Boofo
04-11-2004, 07:14 PM
Check out my forumhome stats cache hack. I serialize the variables in there with IDs as well as other things. Great thing the datastore is! ;)

Just make sure you ALWAYS add addslashes to it before you serialize anything. ;)