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,
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
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
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
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
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
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
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);
8 matches
Mail list logo