Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php save array in mysql database

$array = array("my", "litte", "array", 2);

$serialized_array = serialize($array); 
$unserialized_array = unserialize($serialized_array); 

var_dump($serialized_array); // gives back a string, perfectly for db saving!
var_dump($unserialized_array); // gives back the array again
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #save #array #mysql #database
ADD COMMENT
Topic
Name
3+1 =