i am trying this code but i get this error: No ending delimiter \'/\' found
$form = \" 2000,50\";
$salary = preg_replace(\'/\',\', \'.\'/\', $f
The '/' in your string is used as a start-of-regex delimiter so you need to escape it. The correct line should read:
$salary = preg_replace('\\/',', '.'/', $form);
I'm also curious why the second param is ', ' . '/' rather than ', /'.
EDIT
Ahh I see now, the line should read:
$salary = preg_replace( '/,/', '.', $form);
I was confused because the first comma in your example should be a '.' to concat the string.