PHP: serialize() function
The serialize() converts a storable representation of a value.
A serialize data means a sequence of bits so that it can be stored in a file, a memory buffer, or transmitted across a network connection link.
(PHP 4 and above)
Name Description Required /Optional Type
value1 The value to be serialized Required Mixed*
example:
<?php $serialized_data = serialize(array('Math', 'Language', 'Science')); echo $serialized_data . '<br>'; ?>
a:3:{i:0;s:4:”Math”;i:1;s:8:”Language”;i:2;s:7:”Science”;}
Share
Abhishek Mittal
You can visit here
https://www.developersmap.com/question/serialize-and-unserialize-in-php/