Re: for loop inside a switch
| From: | Per Jessen | Date: | Thu, 16 Aug 2007 09:48:24 +0000 |
| Subject: | Re: for loop inside a switch | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-260899@lists.php.net to get a copy of this message | ||
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.
You should look up "self-modifying code" - maybe in wikipedia.
/Per Jessen