Re: [PHP] Re: "searching" arrays

2001-08-15 Thread David Robley
On Wed, 15 Aug 2001 16:17, Raphael Pirker wrote: > Hi Richard, > > Thanks a lot for your prompt reply!! I get a parse-error, however, on > line 77 (marked below): > > function search_the_array($array) { > global $search_tmp; > $result = array_search($search_tmp, $array,

[PHP] Re: "searching" arrays

2001-08-14 Thread Raphael Pirker
Hi Richard, Thanks a lot for your prompt reply!! I get a parse-error, however, on line 77 (marked below): function search_the_array($array) { global $search_tmp; $result = array_search($search_tmp, $array, TRUE); reset($array); Line77:while (!($resu

[PHP] Re: "searching" arrays

2001-08-14 Thread Richard Lynch
> is there also a way to search for, let's say '*china*' because in my array > it would say "Republic of China" and when searching for "china" I get no > result from the array... You'd have to walk through the array and use strstr or ereg for that. You could maybe use PHP's array_walk function,

[PHP] Re: "searching" arrays

2001-08-14 Thread Raphael Pirker
is there also a way to search for, let's say '*china*' because in my array it would say "Republic of China" and when searching for "china" I get no result from the array... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-ma

[PHP] Re: "searching" arrays

2001-08-14 Thread Raphael Pirker
hehe, oops! :) thanks by the way,it worked! :)) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

[PHP] Re: "searching" arrays

2001-08-14 Thread Inércia Sensorial
in_array(); -- Julio Nobrega. 2B||!BB - That's the question. "Raphael Pirker" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > > Is there a possibility to search arrays in PHP? For example I'd like to find > out the index-number of > > $countries["si

[PHP] Re: "searching" arrays

2001-08-14 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Raphael Pirker) wrote: > Is there a possibility to search arrays in PHP? Yes, and you'll never guess what it's called! (Hint: see ). -- CC -- PHP General Mailing List (http://www.php.net