note 44001 added to function.strpos
| From: | nikon at lochkarte dot org | Date: | Mon, 12 Jul 2004 08:36:44 +0000 |
| Subject: | note 44001 added to function.strpos | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-73083@lists.php.net to get a copy of this message | ||
i've got a little problem using strpos()
when i try to find a needle beginning with and space, the function ignores thats space, like it
makes internally an trim() onto the needly string.
for example:
$lsText = "i search for http:// and <a href="http://bla"> should be ignored";
$lsNeedle = " http://"; // leeding whitespace
$liPos1 = strpos( $lsText, $lsNeedle );
$liPos2 = strpos( $lsText, $lsNeedle, $liPos1 );
in that case the $liPos2 shows me the beginning of the second http:// inside
of the <a href tag. but that is not the thing i would like this method to do :)
anyone an hint?
----
Manual Page -- http://www.php.net/manual/en/function.strpos.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+44001
Delete -- http://master.php.net/manage/user-notes.php?action=delete+44001&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+44001&report=yes
Search -- http://master.php.net/manage/user-notes.php