“PHP serialize ()” Code-Antworten

PHP Serialize Array

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

$str = serialize($array);
Worrisome Whale

PHP serialize ()

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

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

Ähnliche Antworten wie “PHP serialize ()”

Fragen ähnlich wie “PHP serialize ()”

Weitere verwandte Antworten zu “PHP serialize ()” auf PHP

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen