Jump to content

[SOLVED] Cost per weight calc


Canman2005

Recommended Posts

Hi all

 

Wondering if someone can help.

 

I have a few variables, they are

 

//weight in grams

$weight = '600';

$price = '299.99';

 

//weight in kilograms (kg)

$weight = '45.2';

$price = '699.21';

 

I need to do a calculation to work out the cost per kilogram (kg) for both my grams variables and also the kilogram (kg) variables

 

What would be the best way to find out the cost per kilogram (kg)

 

Any help would be ace

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/130486-solved-cost-per-weight-calc/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.