Sorry I hadn't read well, yes use if(!($i %3)) echo "lala";

--

Nicos - CHAILLAN Nicolas
[EMAIL PROTECTED]
www.WorldAKT.com - Hébergement de sites Internet

<[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
> Hi,
>
> On every loop, just put the text you want to add to a variable.
> like
> if($i == 0) echo "first print";
> elseif($i == 1) echo "second";
> elseif($i == 2) echo "third"; etc...
>
> --
>
> Nicos - CHAILLAN Nicolas
> [EMAIL PROTECTED]
> www.WorldAKT.com - Hébergement de sites Internet
>
> "Cirkit Braker" <[EMAIL PROTECTED]> a écrit dans le message de
news:
> [EMAIL PROTECTED]
> > what would be the best, most efficient way to print something every
three
> > times a loop runs
> >
> >       for ($i=0; $i<$num_products; $i++)
> >       {
> >             echo "something";
> >        }
> >
> > this happens every time it runs and has to stay that way but every three
> > times i want to print additional info.
> >
> > Any help appreciated.
> >
> >
>
>



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

Reply via email to