[PHP] Array query - finding the key for a value

2002-08-16 Thread Tim Fountain
' is in the array; but how do I then find out which index 'orange' is at? -- Tim Fountain ([EMAIL PROTECTED]) http://www.tfountain.co.uk/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] preg_match() occurence position

2002-07-25 Thread Tim Fountain
($matches[1]); } Of course, if test occurs more than once then the above won't work, since regex's are greedy... If you add a ? after the * then that'll make it non-greedy won't it? -- Tim Fountain ([EMAIL PROTECTED]) http://www.tfountain.co.uk/ -- PHP General Mailing List (http

Re: [PHP] Using PHP with MySQL - Can I supress MySQL errors?

2002-07-23 Thread Tim Fountain
= @mysql_connect('blah','blah','blah') or some_error_function(); or I guess you could also do: $result = @mysql_connect('blah','blah','blah'); if (!$result) { $error_array[] = mysql_error(); ... } -- Tim Fountain ([EMAIL PROTECTED]) http://www.tfountain.co.uk/ -- PHP General Mailing List (http