Transferring php arrays between pages_PHP tutorial

WBOY
Release: 2016-07-13 17:46:52
Original
1285 people have browsed it

Serialize the array on the local page, $_SESSION['data'] = serialize($commoditycount) and obtain it through unserialization of the array on another page,

$data = unserialize($_SESSION['data']); The values ​​of key and value can be obtained by traversing,

1. while(list($key,$value)=each($data)){

2. 

3. echo "$key : $value
";}

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/478557.htmlTechArticleSerialize the array on the local page, $_SESSION[data] = serialize($commoditycount) on another page The array is obtained by unserialization, $data = unserialize($_SESSION[data]); through traversal...
source:php.cn
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