note 126229 added to function.printf
| From: | steve at myschoolsystems dot com | Date: | Thu, 08 Jul 2021 02:47:36 +0000 |
| Subject: | note 126229 added to function.printf | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-216590@lists.php.net to get a copy of this message | ||
To format a dollar value as in $123.00 that may otherwise look like $123 use this
print ('$'); // the dollar sign in front of our answer
printf ('%.2f',$price);
----
Server IP: 45.112.84.4
Probable Submitter: 45.112.85.242 (proxied: 173.22.83.57)
----
Manual Page -- https://php.net/manual/en/function.printf.php
Edit -- https://main.php.net/note/edit/126229
Del: integrated -- https://main.php.net/note/delete/126229/integrated
Del: useless -- https://main.php.net/note/delete/126229/useless
Del: bad code -- https://main.php.net/note/delete/126229/bad+code
Del: spam -- https://main.php.net/note/delete/126229/spam
Del: non-english -- https://main.php.net/note/delete/126229/non-english
Del: in docs -- https://main.php.net/note/delete/126229/in+docs
Del: other reasons-- https://main.php.net/note/delete/126229
Reject -- https://main.php.net/note/reject/126229
Search -- https://main.php.net/manage/user-notes.php