Home > PHP > Function > PCRE > preg_replace()

preg_replace()

preg_replace - Perform a regular expression search and replace

Syntax

mixed preg_replace ()

Arguments

-

Description

Searches subject for matches to pattern and replaces them with replacement.

Version

PHP 4, 5

Return value

preg_replace() returns an array if the subject parameter is an array, or a string otherwise.