Hi,
I am trying to preg_replace function but I am getting following error:
2019/11/07 22:08:53 [error] 1204#1204: *16 FastCGI sent in stderr: “PHP message: PHP Warning: preg_replace(): No ending delimiter ‘,’ found in /var/www/html/f_passbyref_p85.php on line 4” while reading response header from upstream, client: 127.0.0.1, se
<?Php
//passing String to function by reference
function stripCommas(&$inputString) {
$inputString = preg_replace(",","", $inputString);
}
$myNumber = "10,000";
stripCommas($myNumber);
print($myNumber);
?>
Some body please guide me.
Zulfi.