[PHP] for loop inside a switch

2007-08-31 Thread jekillen
On Aug 31, 2007, at 6:26 PM, Robert Cummings wrote: On Fri, 2007-08-31 at 15:56 -0700, Dan wrote: Sanjeev is right. You're thinking about the problem backwards. You're trying to build a Switch inside a loop. Remember, if you ever have to do some operating multiple times you're using a forlo

Re: [PHP] for loop inside a switch

2007-08-31 Thread Robert Cummings
On Fri, 2007-08-31 at 15:56 -0700, Dan wrote: > Sanjeev is right. You're thinking about the problem backwards. You're > trying to build a Switch inside a loop. Remember, if you ever have to do > some operating multiple times you're using a forloop, then the thing that > you want to repeat(swi

Re: [PHP] for loop inside a switch

2007-08-31 Thread Dan
age- From: Hulf [mailto:[EMAIL PROTECTED] Sent: Thursday, August 16, 2007 3:11 PM To: php-general@lists.php.net Subject: [PHP] for loop inside a switch Hi, switch ($q) { for ($i=0; $i <21; $i++) { case 'faq$i': echo $faq1; break; } } I just want to loop out a b

RE: [PHP] for loop inside a switch

2007-08-17 Thread Sanjeev N
16, 2007 3:11 PM To: php-general@lists.php.net Subject: [PHP] for loop inside a switch Hi, switch ($q) { for ($i=0; $i <21; $i++) { case 'faq$i': echo $faq1; break; } } I just want to loop out a big long list of cases. -- PHP General Mailing List (http://www.php.net/) To un

Re: [PHP] for loop inside a switch

2007-08-16 Thread Jim Lucas
Hulf wrote: Hi, switch ($q) { for ($i=0; $i <21; $i++) { case 'faq$i': echo $faq1; break; } } I just want to loop out a big long list of cases. are the case's that you want to create with the loop going to be the only case statements in the switch? -- Jim Lucas "Some men are

Re: [PHP] for loop inside a switch

2007-08-16 Thread Dimiter Ivanov
On 8/16/07, Hulf <[EMAIL PROTECTED]> wrote: > Hi, > > switch ($q) { > > for ($i=0; $i <21; $i++) { > case 'faq$i': > echo $faq1; > break; > } > } > > > I just want to loop out a big long list of cases. Maybe you want this kind of functionality : http://www.php.net/manual/en/language.varia

Re: [PHP] for loop inside a switch

2007-08-16 Thread Stut
Hulf wrote: Hi, switch ($q) { for ($i=0; $i <21; $i++) { case 'faq$i': echo $faq1; break; } } I just want to loop out a big long list of cases. That's not a valid construct, but if I understand what you're trying do, this should work... $faqs = array(); for ($i = 0; $i < 21; $i+

Re: [PHP] for loop inside a switch

2007-08-16 Thread Mohamed Yusuf
I don't think it is going to work. IMO On 8/16/07, Hulf <[EMAIL PROTECTED]> wrote: > > Hi, > > switch ($q) { > > for ($i=0; $i <21; $i++) { > case 'faq$i': > echo $faq1; > break; > } > } > > > I just want to loop out a big long list of cases. > > -- > PHP General Mailing List (http://www.p

[PHP] for loop inside a switch

2007-08-16 Thread Hulf
Hi, switch ($q) { for ($i=0; $i <21; $i++) { case 'faq$i': echo $faq1; break; } } I just want to loop out a big long list of cases. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php