FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » illegal offset problem
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: illegal offset problem [message #184038 is a reply to message #184037] Tue, 03 December 2013 14:16 Go to previous messageGo to previous message
Paul Herber is currently offline  Paul Herber
Messages: 26
Registered: February 2011
Karma:
Junior Member
On Tue, 3 Dec 2013 09:00:50 -0500, richard <noreply(at)example(dot)com> wrote:

>
> foreach ($six0 as $item){
>
> $year=$six0[$item]['year'];
> echo $year;
>
>
> }
>
> If $item is an illegal offset, then what is the proper way to retrieve the
> value of a 2d array?

RTFM
http://us1.php.net/manual/en/language.types.array.php

There is an example of foreach with a 2D array halfway down the page.
FFS.



--
Regards, Paul Herber, Sandrila Ltd.
http://www.sandrila.co.uk/ twitter: @sandrilaLtd
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Can I download file with address like this "http://***.com/file.php/ABC.html" automatically ?
Next Topic: request for error checking feature
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Jul 05 20:50:35 GMT 2024

Total time taken to generate the page: 0.04303 seconds