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:
>>
>> x > ($cartoon['art_height']
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:
x ($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?
Man
: [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:
x ($cartoon['art_height'] * 2.54); ?> cm
How can I limit the result
> 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:
>
> x ($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?
>
Use
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:
x ($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?
x
Hello Jack,
Wednesday, June 22, 2005, 2:17:48 PM, you wrote:
JJ> How can I limit the result of that math to one decimal place, ie,
JJ> 9.5 cm, not 9.523 cm?
number_format() is your friend.
Best regards,
Richard Davey
--
http://www.launchcode.co.uk - PHP Development Services
"I do not fear c
> 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:
> x ($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?
ummm, round()?
thnx,
Chris
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:
x ($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
-
8 matches
Mail list logo