Home >Backend Development >PHP Tutorial > TP session多维数组什么格式?该如何处理

TP session多维数组什么格式?该如何处理

WBOY
WBOYOriginal
2016-06-13 12:59:40963browse

TP session多维数组什么格式?

<br />
<?php<br />
session_start();<br />
$arr =array('1'=>'a','2'=>'b');<br />
$arr =array('1'=>'a','2'=>'bc');<br />
//<br />
$_SESSION['list'][]=$arr;<br />
$_SESSION['list'][]=$arr;<br />
<br />
print_r( $_SESSION['list']);<br />
<br />


就是存成多维数组,TP下是怎么写的?

------解决方案--------------------
既然你用 TP 就要按 TP 的规矩来
TP 不是提供了 session 函数用于 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