note 114570 deleted from function.doubleval by cmb
| From: | cmb@php.net | Date: | Sat, 25 Jun 2016 14:59:52 +0000 |
| Subject: | note 114570 deleted from function.doubleval by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-205810@lists.php.net to get a copy of this message | ||
Note Submitter: mike at onethingsimple dot com
----
// The code above will throw an error, I believe you meant to
// echo number_format($mynum) instead of $mynumstr
// variable $mynum holds the value of the string processed by
// doubleval
<?php
$mynumstr = "100,000,000.75";
$mynum = doubleval(str_replace(",","",$mynumstr));
echo "Normal Value:".number_format($mynum);
?>