Your Open Source
Free YourOpenSource Softwares Online Resources and Softwares Downloads with Demo
Related Links
PHP
serialize() and unserialize() in php
serialize() and unserialize() :-
Serialize :- This is useful for storing or passing PHP values around withoutlosing their type and structure. For example stored the data like session data. The stored the data format like
a:1:{s:5:"title";s:71:"This is simple example of the serialize and unserialize function in php";} Unserialize :- single serialized variable and
converts it back into a PHP value and return real PHP array.
Example :-
$_POST['title']="This is simple example of the serialize and unserialize function in php";
$SerializeStr=serialize($_POST);
print_r("Serialize:- ".$SerializeStr);
echo "Unserialize:- ";
print_r(unserialize($SerializeStr));
Output:-
Serialize:- a:1:{s:5:"title";s:71:"This is simple example of the serialize and unserialize function in php";}
Unserialize:- Array
(
[title] => This is simple example of the serialize and unserialize function in php
)
121
Dec 11 09 05:53:32
Sekar
Rating : 









|
|||||
Digg
Yahoo
delicious