我想显示下面显示的数组中的值,如何用PHP编写语法来获得结果显示?
我想显示下面显示的数组中的值,如何用PHP编写语法来获得结果显示 我就是这样得到下面的数组的 现在我的要求是得到“osCsid”的值,请帮我解决我想显示下面显示的数组中的值,如何用PHP编写语法来获得结果显示?,php,arrays,object,Php,Arrays,Object,我想显示下面显示的数组中的值,如何用PHP编写语法来获得结果显示 我就是这样得到下面的数组的 现在我的要求是得到“osCsid”的值,请帮我解决 echo "<pre>"; var_dump($_SESSION["navigation"]); object(navigationHistory)#2 (2) { ["path"]=> array(4) { [0]=> array(4) { ["
echo "<pre>";
var_dump($_SESSION["navigation"]);
object(navigationHistory)#2 (2) {
["path"]=>
array(4) {
[0]=>
array(4) {
["page"]=>
string(10) "logoff.php"
["mode"]=>
string(6) "NONSSL"
["get"]=>
array(0) {
}
["post"]=>
array(0) {
}
}
[1]=>
array(4) {
["page"]=>
string(9) "index.php"
["mode"]=>
string(6) "NONSSL"
["get"]=>
array(1) {
["osCsid"]=>
string(26) "m3gvb90q0c36p7chtiq6pksrs6"
}
["post"]=>
array(0) {
}
}
[2]=>
array(4) {
["page"]=>
string(11) "account.php"
["mode"]=>
string(6) "NONSSL"
["get"]=>
array(1) {
["osCsid"]=>
string(26) "m3gvb90q0c36p7chtiq6pksrs6"
}
["post"]=>
array(0) {
}
}
[3]=>
array(4) {
["page"]=>
string(24) "account_history_info.php"
["mode"]=>
string(6) "NONSSL"
["get"]=>
array(2) {
["order_id"]=>
string(3) "491"
["osCsid"]=>
string(26) "m3gvb90q0c36p7chtiq6pksrs6"
}
["post"]=>
array(0) {
}
}
}
["snapshot"]=>
array(0) {
}
}
echo”“;
变量转储($_会话[“导航]);
对象(导航历史记录)#2(2){
[“路径”]=>
阵列(4){
[0]=>
阵列(4){
[“页面”]=>
字符串(10)“logoff.php”
[“模式”]=>
字符串(6)“NONSSL”
[“获取”]=>
数组(0){
}
[“发布”]=>
数组(0){
}
}
[1]=>
阵列(4){
[“页面”]=>
字符串(9)“index.php”
[“模式”]=>
字符串(6)“NONSSL”
[“获取”]=>
阵列(1){
[“osCsid”]=>
字符串(26)“m3gvb90q0c36p7chtiq6pksrs6”
}
[“发布”]=>
数组(0){
}
}
[2]=>
阵列(4){
[“页面”]=>
字符串(11)“account.php”
[“模式”]=>
字符串(6)“NONSSL”
[“获取”]=>
阵列(1){
[“osCsid”]=>
字符串(26)“m3gvb90q0c36p7chtiq6pksrs6”
}
[“发布”]=>
数组(0){
}
}
[3]=>
阵列(4){
[“页面”]=>
字符串(24)“account\u history\u info.php”
[“模式”]=>
字符串(6)“NONSSL”
[“获取”]=>
阵列(2){
[“订单id”]=>
字符串(3)“491”
[“osCsid”]=>
字符串(26)“m3gvb90q0c36p7chtiq6pksrs6”
}
[“发布”]=>
数组(0){
}
}
}
[“快照”]=>
数组(0){
}
}
或者类似的东西
或者类似的东西
$osCsid = array()
foreach ($_SESSION["navigation"]["path"] as $value)
{
$osCsid[] = $value["get"]["osCsid"];
}