Re: Amy's Site question
| From: | Angelo Zanetti | Date: | Wed, 22 Jun 2005 15:33:40 +0000 |
| Subject: | Re: Amy's Site question | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-217422@lists.php.net to get a copy of this message | ||
what does this have to do with amy's site?
just curious about the subject
John Nichel wrote:
> Jack Jackson wrote:
>
>> Hello,
>>
>> On a site I'm listing measurements in both inches and cm; in the db
>> they're stored as inches. To convert them to cm I'm doing:
>>
>> <?php echo ($cartoon['art_width'] * 2.54); ?> x <?php echo
>> ($cartoon['art_height'] * 2.54); ?> cm
>>
>>
>> How can I limit the result of that math to one decimal place, ie, 9.5
>> cm, not 9.523 cm?
>
>
> Manual -> Strings -> Number_Format
> Manual -> Strings -> Printf
> Manual -> Math -> Round
> Manual -> ...
>
> Oh hell. It's in the manual.
>