You are here: Re: [PHP] Amy's Site question « PHP « IT news, forums, messages
Re: [PHP] Amy's Site question

Posted by Jack Jackson on 10/20/32 11:19

Thanks everyone! I did look in the manual under operators and must have
missed the link to round. Thanks to all who replied!



Simon Allison wrote:
> http://au3.php.net/round
>
>
> -----Original Message-----
> From: Jack Jackson [mailto:jackson.linux@gmail.com]
> Sent: Wednesday, 22 June 2005 9:18 PM
> To: [php] PHP General List
> Subject: [PHP] Amy's Site question
>
> 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?
>
> Thanks in advance,
> JJ
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация