note 41627 added to function.strpos
| From: | arjini at mac dot com | Date: | Sat, 17 Apr 2004 10:24:13 +0000 |
| Subject: | note 41627 added to function.strpos | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-68241@lists.php.net to get a copy of this message | ||
Some may find this off topic, but this is strpos for javascript:
function strpos(s,c){
for(i=0;i<s.length;i++){
if(s.substring(i,i+1)==c)
return i;
else
return
false;
}
}
Wrote that because JS regexes were driving me nuts, and I just wanted to write PHP, but
couldn't.
----
Manual Page -- http://www.php.net/manual/en/function.strpos.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+41627
Delete -- http://master.php.net/manage/user-notes.php?action=delete+41627&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+41627&report=yes
Search -- http://master.php.net/manage/user-notes.php