(Support PHP 4 and above)

serialize — the serialize function will convert the given parameter (usually an array) into a normal string that can be saved in a file, pass as a URL variable, etc. It is very useful to store or pass PHP values around without losing their actual type and structure.


$data = array();
$data[] = "The";
$data[] = "Quick";
$data[] = "Brown fox";

$serialized_data = serialize($data);
print $serialized_data . "\n";

a:3:{i:0;s:3:”The”;i:1;s:5:”Quick”;i:2;s:9:”Brown fox”;}
PHP serialize Function

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: