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
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, TRUE);
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
http://php.net/manual/en/function.array-search.php).
--
CC
--
PHP General Mailing List (http://www.php.net/)
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[singapore];
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]
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-mail:
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, but
7 matches
Mail list logo