Re: Can I search for a partial match in an array ?

From: Date: Fri, 29 Mar 2002 02:43:58 +0000
Subject: Re: Can I search for a partial match in an array ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-90640@lists.php.net to get a copy of this message
On Thu, 2002-03-28 at 16:50, Dalton Hunter wrote: > Hi, I want to search for a partial match in an array? Does in_array() or > search_array() support this or is there another way? For example if I have > 30 file names in an array in the format ... > > file1.txt > file2.txt > pic1.gif > pic2.gif > > ... how can I check to see if any values in the array start with the > partial word "file"? http://www.php.net/preg_grep Hope this helps, Torben Torben Wilson <torben@php.net> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506

« previous php.general (#90640) next »