strpos with array?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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) {
	   $term = str_replace($replace, "", $term);
	   echo 'term without the word:'.$term;
	}

This does of course not work since strpos does not take arrays.

Thank you for any help,

Merlin

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux