Board logo

标题: 将数组变量存放到cookie里面 [打印本页]

作者: fangzhen    时间: 2009-8-17 13:37     标题: 将数组变量存放到cookie里面

可以将数组foreach后存到cookie数组里:
You may also set array cookies by using array notation in the cookie name. This has the effect of setting as many cookies as you have array elements, but when the cookie is received by your script, the values are all placed in an array with the cookie's name: 例子 3. setcookie() and arrays [php] $value) { echo "$name : $value
\n"; } } /* which prints three : cookiethree two : cookietwo one : cookieone */ ?> [/php]





欢迎光临 PHP开发笔记 (http://phpvi.com/) Powered by Discuz! 6.1.0