PHP - Php Serialize!
Code: [Select]
$order = array(0,1,2); echo serialize($order); Shows: Code: [Select] a:3:{i:0;i:0;i:1;i:1;i:2;i:2;} which is fine, because I can use unserialized. But I need to let me users switch between 0,1,2 to be in what ever order they want it to!, how would I go about saving the data ? Similar Tutorialsi tried to serialize an array in php but im not sure if i had the right syntax $field[0] = "Student Name"; $field[1] = "fail"; $field_ser = serialize($field); $field_unser = unserialize($field_ser); i think i didnt do it right I want to store an array in a mysql table. all of the values in the array are numbers. Should I serialize or implode? What's the difference? Thanks! Hello, I'm looking for a better serialize() function. the php one has a fault of counting the slashes, before stripping them out, making the deserialize() fail, because the actual string count, is different from the string count as referenced... does anyone have one already? Hello! |