note 35054 added to function.substr-replace
| From: | websys007 at yahoo dot ca | Date: | Mon, 18 Aug 2003 06:28:41 +0000 |
| Subject: | note 35054 added to function.substr-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-54555@lists.php.net to get a copy of this message | ||
This stri_replace() function is very short
function stri_replace($search,$replace,$text) {
$pos=strpos(strtolower($text),strtolower($search));
if ($pos!==false){
$text=substr_replace ( $text, $replace, $pos,strlen($search));
}
return $text;
}
----
Manual Page -- http://www.php.net/manual/en/function.substr-replace.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35054
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35054&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35054&report=yes