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

Home » Imported messages » comp.lang.php » foreach problem
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: foreach problem [message #184273 is a reply to message #184266] Thu, 19 December 2013 19:19 Go to previous messageGo to previous message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma:
Senior Member
On 19/12/13 18:06, Tim Streater wrote:
> In article <4crg8sz8mnlg(dot)kvx5ofaf71nu(dot)dlg(at)40tude(dot)net>, richard
> <noreply(at)example(dot)com> wrote:
>
>> <?php
>>
>> $alist="$art".$year;
>> $num=0;
>> foreach ($alist as $num){ echo $list[$num++][0]; }
>> ?>
>>
>>
>> my bracketed arrays are designed with $art60[][] format.
>> where "60" will change with the given year.
>> Using the above script, I get "invalid argument".
>> So what would be a valid argument?
>>
>> The array is setup so that $art60[number][0]=artist name (always).
>> then each record for that artist is listed in 3d format.
>> $art60[number][record]['info']="data".
>
> Is alist an array, like it says in the foreach doccy? And why are you
> incrementing $num ?
>
Its richard. The question will make no sense.

Killfile.


--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to
lead are elected by the least capable of producing, and where the
members of society least likely to sustain themselves or succeed, are
rewarded with goods and services paid for by the confiscated wealth of a
diminishing number of producers.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: URL linking to 3d array
Next Topic: working model of the latest project
Goto Forum:
  

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

Current Time: Tue Nov 26 12:28:19 GMT 2024

Total time taken to generate the page: 0.04739 seconds