note 44001 deleted from function.strpos by betz
| From: | betz@php.net | Date: | Mon, 12 Jul 2004 08:59:57 +0000 |
| Subject: | note 44001 deleted from function.strpos by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-73087@lists.php.net to get a copy of this message | ||
Note Submitter: nikon@lochkarte.org
----
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?