note 10653 added to strspn
| From: | Maxwell_Smart at ThePentagon dot com | Date: | Mon, 15 Jan 2001 18:40:53 +0000 |
| Subject: | note 10653 added to strspn | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-9815@lists.php.net to get a copy of this message | ||
As with all string functions, make sure to recognize what is 0 based and what is 1 based. Since this
function is 1 based, you'll need to subtract one for other functions.
$A = "AABBABC";
Echo "<BR>>>" . SubStr($A, 0, (StrSpn($A, "ABC") - 1)) .
"<<";
http://www.php.net/manual/en/function.strspn.php