tags:

views:

32

answers:

1

Hi

I want to display the value from the array displayed below, how to write a syntax in PHP to get the result display?

This is how I got the below array

Now my requirement is to get the value of "osCsid", please help me out...

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) {
      }
    }
+1  A: 
$osCsid = array()

foreach ($_SESSION["navigation"]["path"] as $value)
{
   $osCsid[] = $value["get"]["osCsid"];
}

or something similar

Tristan