note 28745 added to function.strrpos

From: Date: Wed, 22 Jan 2003 20:23:53 +0000
Subject: note 28745 added to function.strrpos
Groups: php.notes 
Request: Send a blank email to php-notes+get-42610@lists.php.net to get a copy of this message
For those of you coming from VBScript, I have converted the instrrev function to PHP: function instrrev($n,$s) { $x=strpos(chr(0).strrev($n),$s)+0; return (($x==0) ? 0 : strlen($n)-$x+1); } Remember that, unlike PHP and Javascript, VBScript returns 0 for no string found and 1 for the first character position, etc. Hopefully this will save some time if you are converting ASP pages to PHP. -- http://www.php.net/manual/en/function.strrpos.php http://master.php.net/manage/user-notes.php?action=edit+28745 http://master.php.net/manage/user-notes.php?action=delete+28745 http://master.php.net/manage/user-notes.php?action=reject+28745

« previous php.notes (#42610) next »