Home >Backend Development >PHP Tutorial > session和数组相互转换解决方案

session和数组相互转换解决方案

WBOY
WBOYOriginal
2016-06-13 13:33:541406browse

session和数组相互转换
我将一个二维数组设置成了一个session,当第二次获得此session的时候将色session还原成以前的二维数组,同时再想这个二维数组插入key-value对


------解决方案--------------------
举例吧,我觉得你描述的不够通俗
------解决方案--------------------

探讨

PHP code

$temScor = array();
$sunMultiScore = array();
$sunMultiScore [0]=$temScor ;//假设$temScor 不是空的
$_SESSION['sunMultiScore']= $sunMultiScore ;//将$sunMultiScore放在session里面


现在的问题是如何将这个……
Statement:
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