OZONE Asylum
Forums
Server-Side Scripting - Oh my!
php calculation & notation question
This page's ID:
31479
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
[code]<?php echo "$sqm m² / " . round($sqm * 10.764) . " sq ft"; ?>[/code] Note what I did there--instead of having 3 print statements, I concatenated with the dot (".") operator. That should clear it up. As for how to format the numbers returned, check out the function [url=http://us3.php.net/manual/en/function.number-format.php]number_format()[/url] function, handles what you need. -[url=http://blog.brokenhattrick.com]S[/url]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »
Maximum Security
OZONE
DHTML/Javascript
Server-Side Scripting - Oh my!
CSS - DOM - XHTML - XML - XSL - XSLT
Stupid Basic HTML
Visual Therapy
Photoshop
Photoshop Pong, Anyone?
***WARNING*** BIG SIG APPROACHING
Photography
3D Modelling & Rendering
Multimedia/Animation
Print Graphics
Holding Pens
Philosophy and other Silliness
Outpatient Counseling
Site reviews!
Mad Scientists' Laboratory
Getting to know the Grail