note 29949 deleted from function.strstr by felipe
| From: | felipe@php.net | Date: | Wed, 16 Apr 2008 11:11:08 +0000 |
| Subject: | note 29949 deleted from function.strstr by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-138365@lists.php.net to get a copy of this message | ||
Note Submitter: crypto at notup2u dot net
----
I've noticed that :
$string = substr($string, 0, strpos($string,$separat));
returns the first par of the string (before $separat) only if there is $separat in the string !
But
$string = substr($string, 0, strlen($string)-strlen (strstr ($string,$separat)));
works anyway ...
That can be useful !
/Crypto