Serializing a PHP Value


Convert a PHP value to a storable representation using serialize().

Source Code

$array = ['apple', 'banana', 'cherry'];
$serialized = serialize($array);
echo $serialized; // Outputs: a:3:{i:0;s:5:"apple";i:1;s:6:"banana";i:2;s:6:"cherry";}
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments