Need Help Printing Multidimensional Array Element
Posted: Mon Feb 23, 2009 1:15 pm
Hi,
I am very new to PHP and am trying to do something that is probably pretty simple to most PHP programmers but I am finding the syntax to be difficult.
I have a multidemensional array and I want to be able to print one or more data values from that array, but so far I just get blanks back on the print (and I know there is data being returned in this array).
Can someone please help me with the syntax for this?
This is the array structure and as you can see, it contains two multidimenstional arrays:
I am very new to PHP and am trying to do something that is probably pretty simple to most PHP programmers but I am finding the syntax to be difficult.
I have a multidemensional array and I want to be able to print one or more data values from that array, but so far I just get blanks back on the print (and I know there is data being returned in this array).
Can someone please help me with the syntax for this?
This is the array structure and as you can see, it contains two multidimenstional arrays:
Code: Select all
$out_parameters = array(
"IOERRFLG" =>"IOERRFLG",
"IOERRDESC" =>"IOERRDESC",
"OUTARRAY1" =>Array("IPATH" => "IPATH",
"IPATH2" => "IPATH2",
"INAME" => "INAME"),
"OUTARRAY2" =>Array("XCNAME" => "XCNAME",
"XDNAME" => "XDNAME",
"XDADDRESS" => "XDADDRESS",
"XDLICSTATE" => "XDLICSTATE")
);
This is the syntax I am using to try to print one element from OUTARRAY2 but it does not work.
print $out_parameters($OUTARRAY2['$XCNAME'][1]);
Help! :-)