note 26689 added to function.strstr
| From: | fred at debilitron dot com | Date: | Fri, 08 Nov 2002 23:44:40 +0000 |
| Subject: | note 26689 added to function.strstr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-39206@lists.php.net to get a copy of this message | ||
The same thing as above, but a bit shorter, with strpos() :
$string = "email@domain.net";
$separat = "@";
$string = substr($string, 0, strpos($string,$separat));
--
http://www.php.net/manual/en/function.strstr.php
http://master.php.net/manage/user-notes.php?action=edit+26689
http://master.php.net/manage/user-notes.php?action=delete+26689
http://master.php.net/manage/user-notes.php?action=reject+26689