You are here: Flat file db. Only display records of unique field data. « All PHP « IT news, forums, messages
Flat file db. Only display records of unique field data.

Posted by H@C0 on 12/08/06 14:32

On Fri, 08 Dec 2006 13:51:57 +0000, Geoff Berrow <blthecat@ckdog.co.uk>
wrote:
Thanks for the quick reply and the piece of script. I needed this.
Not using a search command, I meant, using a form and input.
Hans


>Don't know what you mean about not using a search command.
>
>Something like this will display all records containing "London"
>
>$search="London";
>
>$data=file("data.txt");
>
>foreach ($data as $row){
> $field=explode("||",$row);
> if(strpos($field[0],$search)!==false){
> echo $row,"<br>";
> }
>unset($field);
>}

 

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

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