note 15504 added to function.strstr
| From: | linuxbaby at yahoo dot com | Date: | Fri, 14 Sep 2001 09:00:20 +0000 |
| Subject: | note 15504 added to function.strstr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-18014@lists.php.net to get a copy of this message | ||
/* CHANGE "lastname, firstname" TO "firstname lastname" OR
** "rolling stones, the" TO "the rolling stones" */
if (strstr($somename, ", "))
{
$newend = substr ($somename, 0, strrpos($somename, ", "));
$newbeginning = substr ($somename, (strrpos($somename, ", ")+2));
$somename = $newbeginning . " " . $newend;
}
http://www.php.net/manual/en/function.strstr.php