php preg_replace
preg_replace is a function which is use in regular expression.
<?php
$preg = "aAAAA Bbbbb";
echo preg_replace("([a-z])", "1", $preg);
?>
There $preg is a variable and we stored some strings in this variable.
preg_replace(); function is a builtin function which has three parameters.
First parameter is for regular expression condition, the second one is for
required output, and the last and third parameter is to select the variable
that in which variable you want to apply preg_replace() function.
<?php
$preg = "aAAAA Bbbbb";
echo preg_replace("([a-z])", "1", $preg);
?>
There $preg is a variable and we stored some strings in this variable.
preg_replace(); function is a builtin function which has three parameters.
First parameter is for regular expression condition, the second one is for
required output, and the last and third parameter is to select the variable
that in which variable you want to apply preg_replace() function.
Comments
Post a Comment