Re: printing out this nested array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Don Don wrote:
I am having a bit of a confusion printing the values of an array i have. When i print_r this array it contains the following:
Array ( [ValueA] => ValueA [ValueB] => valueB [TestValue] => TestValue [Errors] => Array ( [0] => Array ( [ErrorId] => AD27JH [ErrorMsg] => OK ) ) ) I can get the values of ValueA, ValueB and TestValue but I am a bit confused at getting the values of ErrorId and ErrorMsg. e.g. echo $arrayName['ValueA']; // will display the value contained there am thinking echo $arrayName['Errors']['ErrorId']; // should display the value but it does not
  Anyone wants to shed more light ?
Cheers


---------------------------------
8:00? 8:25? 8:40?  Find a flick in no time
 with theYahoo! Search movie showtime shortcut.
suggestion for next time. echo a <pre> or <plaintext> tag out before you echo your array next time and you will then see the nesting of the arrays

Doing that would have made the answer to this question very obvious

--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
       and some have greatness thrust upon them."

Unknown

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux