Convert currency to decimal in PHP and JavaScript

construction

New Member
I'm looking for the shortest/easiest way to achieve this.\[code\]var savings = <?php echo $list_price ?> - discount_price;\[/code\]\[code\]savings: 1.00\[/code\]\[code\]$list_price: '$10.00';\[/code\]\[code\]discount_price: '$9.00';\[/code\]Cheers.
 
Back
Top