Calculating cubic metres for sale website

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Calculating cubic metres for sale website

Post by simonmlewis »

Hi

I have seen websites where you enter wood, in a width (of say 25mm), thickness (of 15mm) and length of 2.1m.
And it comes up with a price.

I'm told per cubic metres of wood it is around £1,000.
I read that you do width x thickness xx length.
If I do that, I get over 787,000. Surely a length of wood is not £1,000.

I did 2100 x 25 x 15. Is that wrong?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Calculating cubic metres for sale website

Post by requinix »

You've managed to calculate the volume in cubic millimeters.
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: Calculating cubic metres for sale website

Post by simonmlewis »

So how do I get that to cubic metres? I read that you divide by 1,000,000,000
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Calculating cubic metres for sale website

Post by requinix »

Or calculate the volume using meters instead of millimeters.
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: Calculating cubic metres for sale website

Post by simonmlewis »

I wish. Problem is, the buyers buy in millimetres rather than metres.
Unless I convert whatever they enter, into metres first?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Calculating cubic metres for sale website

Post by requinix »

If you lived in America I would forgive you for not knowing how to convert millimeters into meters. Those aren't units we use much over here. But you're in the UK. You should know this. You really, really should know this.

Boggles my mind.

Code: Select all

(25 / 1000) * (15 / 1000) * 2.1
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Calculating cubic metres for sale website

Post by Christopher »

What has this world come to when an American is explaining metric conversion to a European! :D :drunk:

PS - you can also think of the numbers as decimals: 25cm = 0.25m, 25mm = 0.025m
(#10850)
User avatar
Vegan
Forum Regular
Posts: 574
Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:

Re: Calculating cubic metres for sale website

Post by Vegan »

Christopher wrote:What has this world come to when an American is explaining metric conversion to a European! :D :drunk:

PS - you can also think of the numbers as decimals: 25cm = 0.25m, 25mm = 0.025m
:banghead:
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
Post Reply