note 29949 added to function.strstr

From: Date: Sat, 01 Mar 2003 23:44:49 +0000
Subject: note 29949 added to function.strstr
Groups: php.notes 
Request: Send a blank email to php-notes+get-44713@lists.php.net to get a copy of this message
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 -- http://www.php.net/manual/en/function.strstr.php http://master.php.net/manage/user-notes.php?action=edit+29949 http://master.php.net/manage/user-notes.php?action=delete+29949 http://master.php.net/manage/user-notes.php?action=reject+29949

« previous php.notes (#44713) next »