Home > Backend Development > PHP Tutorial > php serialize and unserialize functions

php serialize and unserialize functions

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-29 09:00:55
Original
1064 people have browsed it

serialize() Convert array to object
unserialize () restore the converted array

<code><span>$array</span> = <span>array</span>();
<span>$array</span>[<span>'key'</span>] = <span>'website'</span>;
<span>$array</span>[<span>'value'</span>]=<span>'www.chhua.com'</span>;
<span>$a</span> = serialize(<span>$array</span>); 

print_r(<span>$a</span>);

<span>$b</span> = unserialize(<span>$a</span>);
print_r(<span>$b</span>);</code>
Copy after login

and get the result as follows
php    serialize与unserialize函数

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces the php serialize and unserialize functions, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template