Reply to Re: Evaluating array and skipping certain results

Your name:

Reply:


Posted by JackM on 05/21/05 18:48

Ewoud Dronkert wrote:

> Shortest imperative version:
>
> $rawdata = file('myfile.ext');
> foreach ($rawdata as $line) {
> $arr = explode('-', trim($line));
> if (strcmp('00', $arr[2])) { //skip if arr[2] is 00
> //do stuff with $arr[0], $arr[1], etc.
> }
> }

Thanks to all who offered solutions. You people are the best. It seems
that Ewoud's suggestion is the easiest to implement and, better still,
it works for my purposes. ;) I'll have to read up on the continue
control structure to see if it would be suitable for other things I do.
Much obliged to everyone.

[Back to original 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

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