View Single Post
Old 05-22-2010, 08:45 PM   #1 (permalink)
maeltar
The Acquainted
 
Join Date: Nov 2009
Location: nr Stratford-Upon-Avon
Posts: 137
Thanks: 3
maeltar is on a distinguished road
Default Scratching my head a bit...

I know someone is going to come up with a simple solution to a problem I'm having...

I need to divide a given length (x) by a number (a) to give me a value between (y) and (z)

e.g

x = 3312
y = 181.6
z = 188.39

a = 18

Result = 184

I did that just with basic math and a bit of human brain power "fuzzy logic" and an educated guess...

Anyone got any ideas how I might go about doing this in php, the code I imagine will be easy it's just am getting lost in while's, if's and then's ....

Please help my sanity !!!!!
__________________
Thanks... Simon

Sex, Drugs & Linux Rules
Send a message via MSN to maeltar
maeltar is offline  
Reply With Quote