|
Posted by matt on 10/22/04 11:34
Steve wrote:
>>The Continue Method is causing me problems, After the first instance
>>where $g != $gallery, it goes to the end of the code and closes the
>>table... then it goes back and prints the second photo, causing the
>>second image to not be inside the table that is opened at the start of
>>the code
>
>
> Firstly, you make the other correction suggested, moving the close
> table tag outside the loop? And secondly, use Erwin's logic which does
> not require an explict "continue":
>
> foreach ($data as $line)
> {
> // ...
> if( $g == $gallery )
> {
> // ...do the table output here...
> }
> }
> // this should be outside the foreach() loop:
> echo '</table>';
>
> ---
> Steve
>
Worked a treat. Thanks for your help!
Navigation:
[Reply to this message]
|