php serialize array
snippet in php

php serialize()

user5000

php array to be storable value in $_SESSION:
 serialize($array)
  serialized array element to be output on page:
unserialize($serializedArray)

php serialize array

user4566

$array["a"] = "Foo";
$array["b"] = "Bar";
$array["c"] = "Baz";
$array["d"] = "Wom";

$str = serialize($array);

php array serialize

user9490

//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));

serializer in php

user9885

serializer in php
 PHP: serialize()