![]() |
|
|
+ Search |
![]()
|
Aug 24th, 2000 21:10
Ben Udall, Adam Daniel, http://www.php.net/manual/function.str-replace.php
You could use regular expressions and ereg_replace() to do this.
However, the str_replace() function is faster and more versitile with
simple search and replace applications.
$str = "This is a sentence.";
$new_str = str_replace("sentence", "", $str);
$new_str should now equal "This is a ."