How to get to value in a nested array
Posted: Sun Aug 10, 2008 1:17 am
Hi All,
I have an array of the following structure
Array ( [string1] => Array ( [0] => attrib Object ( [id] => 22:42 [identifier] => string1 [value] => diamond ) ) )
which I got my print_r.
Now my problem is how to get to the value which is corresponding to the [value] i.e here 'diamond'.
I have tried several things including
$arr[0][0][value]
$arr->string1->value
or even a plain $arr[0] but i am getting syntax error.
Thanks for helping me
I have an array of the following structure
Array ( [string1] => Array ( [0] => attrib Object ( [id] => 22:42 [identifier] => string1 [value] => diamond ) ) )
which I got my print_r.
Now my problem is how to get to the value which is corresponding to the [value] i.e here 'diamond'.
I have tried several things including
$arr[0][0][value]
$arr->string1->value
or even a plain $arr[0] but i am getting syntax error.
Thanks for helping me