PHP $0 Is Set To Whole Match, Then $1, $2 – String Function
<? $match = "/the (car|cat) sat on the (drive|mat)/"; $input = "the cat sat on the mat"; print preg_replace($match, "Matched $0, $1, and $2\n", $input); ?>
Filed Under: Php Basics Examples
<? $match = "/the (car|cat) sat on the (drive|mat)/"; $input = "the cat sat on the mat"; print preg_replace($match, "Matched $0, $1, and $2\n", $input); ?>
Filed Under: Php Basics Examples
This feature has not been activated yet.