Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php array serialize

//If you plan to serialize and store it in file or database use below syntax
//to safely serialize
$safe_string_to_store = base64_encode(serialize($multidimensional_array));

//to unserialize...
$array_restored_from_db = unserialize(base64_decode($encoded_serialized_string));
Source by davidwalsh.name #
 
PREVIOUS NEXT
Tagged: #php #array #serialize
ADD COMMENT
Topic
Name
4+4 =