Serialize---&http://www.aliyun.com/zixun/aggregation/37954.html ">nbsp; A representation that produces a stored value
Syntax: String serialize (mixed value)
Description:
Serialize () returns a string containing the byte-stream, represented by value, that can be stored anywhere.
This can be used to store or pass PHP values without losing their form and structure.
Using Unserialize () enables the serialized string to become the original PHP value again. Serialize () can handle the form of integer, double, string, array (faceted), object (the properties of the object will be serialized, but the method will be lose)
Example:
<?php
$session _data contains a multi-dimensional array with session
Information for the current user. We use serialize () to store
It in a database at the end of the request.
$conn = Odbc_connect ("WebDB", "PHP", "chicken");
$stmt = Odbc_prepare ($conn, "UPDATE sessions SET data =? WHERE id =? ");
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.