User Tools

Site Tools


Sidebar

Software

str_replace

str_replace


str_replace - Replace all occurrences of the search string with the replacement string

Description

str_replace("$search","$replace","$subject")

This function returns a string

Parameters

$search
The value being searched for

$replace
The replacement value that replaces found search values

$subject
The string being searched and replaced on

Examples

$txt="hello world"
$replaced=str_replace("o","uu","$txt")
alert($replaced)
str_replace.txt · Last modified: 2019/12/17 12:13 (external edit)