March 2002
Intermediate to advanced
528 pages
21h 29m
English
str_replace
mixed str_replace(mixedsearch, mixedreplace, mixedstring)
Searches for all occurrences of search in
subject and replaces them with
replace. If all three parameters are
strings, a string is returned. If string
is an array, the replacement is performed for every element in the
array and an array of results is returned. If
search and
replace are both arrays, elements in
search are replaced with the elements in
replace with the same numeric indexes.
Finally, if search is an array and
replace is a string, any occurrence of any
element in search is changed to
replace.