string str_replace ( string $search, string $replace, string $subject [ , int &$count ] )
str_replace() replaces some characters with some other characters in a string.
※ available F/W version : all
Returns a string with the replaced values, PHP error on error
<?php
$search = "Mark";
$replace = "John";
$subject = "His name is Mark. Mark is handsome.";
$count = 0;
$ret = "";
$ret = str_replace($search, $replace, $subject, $count);
echo "count: $count, ret: $ret\r\n"; // OUTPUT: count: 2, ret: His name is John. John is handsome.
?>
str_repeat() / strpos() / substr() / substr_replace()
This function is identical to the PHP group’s str_replace() function but doesn’t support array.