note 23946 added to function.strrchr

From: Date: Fri, 02 Aug 2002 01:09:15 +0000
Subject: note 23946 added to function.strrchr
Groups: php.notes 
Request: Send a blank email to php-notes+get-34113@lists.php.net to get a copy of this message
the example is stupid: // get last directory in $PATH $dir = substr(strrchr($PATH, ":"), 1); // get everything after last newline $text = "Line 1\nLine 2\nLine 3"; $last = substr(strrchr($text, "\n"), 1 ); Now the "10" was changed to a "\n"... not everyone knows the ASCII table by heart! -- http://www.php.net/manual/en/function.strrchr.php http://master.php.net/manage/user-notes.php?action=edit+23946 http://master.php.net/manage/user-notes.php?action=delete+23946 http://master.php.net/manage/user-notes.php?action=reject+23946

« previous php.notes (#34113) next »