Name
substr_replace
Synopsis
string substr_replace(mixedstring
, mixedreplace
, mixedoffset
[, mixedlength
])
Replaces a substring in string
with
replace
. The substring replaced is selected
using the same rules as those of substr()
. If string is an array,
replacements take place on each string within the array. In this case,
replace
, offset
,
and length
can either be scalar values,
which are used for all strings in string
,
or arrays of values to be used for each corresponding value in
string
.
Get Programming PHP, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.