You are here: Re: PHP Foreach HELP! « PHP Programming Language « IT news, forums, messages
Re: PHP Foreach HELP!

Posted by matt on 10/23/67 11:34

Steve wrote:
>>The line
>
>
>>>if ( $g != $gallery ) next($line);
>>
>>should be replaced by
>>
>>if ( $g != $gallery ) continue;
>
>
> After the correct gallery is found this solution will waste cycles
> looking at entries that will not match.
>
> ---
> Steve
>

Thanks for all the responses.

As it is a flat file that is used for all galleries, and it appends a
line to the bottom of the file each time a record is added, the
galleries are mixed up throughout the file, so if it stops as soon as
the first match is found, it will not print the rest of the records out.

I will try the "continue" method and see how it works.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация