Burhan Khalid wrote:
Merlin wrote:
Burhan Khalid wrote:
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);
//
Merlin wrote:
Burhan Khalid wrote:
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) {
Burhan Khalid wrote:
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_
Burhan Khalid wrote:
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_
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)
Hello,
Have you tried using array_keys or array_search for finding an occurrence in
an array?
HTH.
Chris.
-Original Message-
From: Merlin [mailto:[EMAIL PROTECTED]
Sent: 10 May 2005 11:11
To: php-general@lists.php.net
Subject: [PHP] strpos with array?
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) {
$term = str_replace($replace,
7 matches
Mail list logo