note 94992 added to function.number-format
| From: | nirmalsinghkps at yahoo dot co dot in | Date: | Mon, 07 Dec 2009 13:43:49 +0000 |
| Subject: | note 94992 added to function.number-format | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-163637@lists.php.net to get a copy of this message | ||
<?
function significant($c)
{
$exp=explode(".",$c);
if(substr($exp[1],1)=="")
{
printf ("%.2f", $c);
}
else
{
echo $c;
}
}
$result=12.503;
echo significant($result);
?>
----
Server IP: 59.162.86.123
Probable Submitter: 122.165.58.219
----
Manual Page -- http://www.php.net/manual/en/function.number-format.php
Edit -- https://master.php.net/note/edit/94992
Del: integrated -- https://master.php.net/note/delete/94992/integrated
Del: useless -- https://master.php.net/note/delete/94992/useless
Del: bad code -- https://master.php.net/note/delete/94992/bad+code
Del: spam -- https://master.php.net/note/delete/94992/spam
Del: non-english -- https://master.php.net/note/delete/94992/non-english
Del: in docs -- https://master.php.net/note/delete/94992/in+docs
Del: other reasons-- https://master.php.net/note/delete/94992
Reject -- https://master.php.net/note/reject/94992
Search -- https://master.php.net/manage/user-notes.php