SyntaxFix
Write A Post
Hire A Developer
Questions
$x = '100.10'; $x = preg_replace("/\.?0*$/",'',$x); echo $x;
There is nothing that can't be fixed with a simple regex ;)
http://xkcd.com/208/