Merlin wrote:
Hi there,

I am wondering if there is a function (I could not find) which does the same thing like strpos does, but with an array.

For example:

    $replace = array("picture", "pics");
    $pos = strpos ($term, $replace);
    //if ($pos !== false) {
if (in_array($term,$replace)) {
       $term = str_replace($replace, "", $term);
       echo 'term without the word:'.$term;
    }

http://www.php.net/in_array

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to