[PHP] Amy's Site question

2005-06-22 Thread Jack Jackson
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,

Re: [PHP] Amy's Site question

2005-06-22 Thread Chris Boget
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

Re: [PHP] Amy's Site question

2005-06-22 Thread Richard Davey
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

Re: [PHP] Amy's Site question

2005-06-22 Thread Burhan Khalid
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

RE: [PHP] Amy's Site question

2005-06-22 Thread Jim Moseby
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

Re: [PHP] Amy's Site question

2005-06-22 Thread Jack Jackson
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

Re: [PHP] Amy's Site question

2005-06-22 Thread John Nichel
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

Re: [PHP] Amy's Site question

2005-06-22 Thread Angelo Zanetti
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);