当我打印我的 Joomla 会话时,我得到如下的数组输出。现在我想找到compare_session并且所有使用这个键的 mtaching 都需要用逗号分开存储。我不会使用重复的键形式数组。
我想要这样的输出:
281,147,136,96,46,30
Array
(
[__default] => Array
(
[session.counter] => 9
[session.timer.start] => 1376717892
[session.timer.last] => 1376718229
[session.timer.now] => 1376718247
[session.client.browser] => Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36
[registry] => JRegistry Object
(
[data:protected] => stdClass Object
(
)
)
[user] => JUser Object
(
[isRoot:protected] => 1
[id] => 42
[name] => Manan
[username] => Manan
[email] =>
manan@letsnurture.com
[password] => 3c4ebaabb8701e80c581c8a291c44073:Aegdm5ddVjEhkJjPIdFlLqj6QZCRnWFO
[password_clear] =>
[usertype] => deprecated
[block] => 0
[sendEmail] => 1
[registerDate] => 2012-10-15 02:03:41
[lastvisitDate] => 2013-08-17 05:38:12
[activation] => 0
[params] => {"admin_style":"","admin_language":"","language":"","editor":"","helpsite":"","timezone":""}
[groups] => Array
(
[8] => 8
)
[guest] =>
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[_params:protected] => JRegistry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[helpsite] =>
[timezone] =>
)
)
[_authGroups:protected] => Array
(
[0] => 1
[1] => 8
)
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
[3] => 3
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[_errors:protected] => Array
(
)
)
[session.token] => 0d79f30e557acf79cada5e55d837caf8
[breadcrumbs] => http://letsnurture-php/PropertyFindbeta/my-propertyfind/watch-list.html?page=2
[pageURL] => http://letsnurture-php/PropertyFindbeta/compare-items.html
[flag] => true
[compare_session_20130817110918] => 281,147,136
[compare_session_20130817111010] => 96,46,30
[compare_session_20130817111333] => 96,46,30
[compare_session_20130817111349] => 96,46,30
[compare_session_20130817111408] => 96,46,30
)
)
有什么想法或建议吗?谢谢。