Forum Moderators: coopster
$t1 = $value-167;
$t2 = $value-166;
$t3 = $value-165;
$t4 = $value-164;
$t5 = $value-163;
$t6 = $value-162;
$t7 = $value-161;
$t8 = $value-160;
$t9 = $value-159;
$t10 = $value-158;
$t11 = $value-157;
In the above code $value is preset within the script, the $tx part derives it's value from the $value string. This works well, but depending on the value of $value the value of the $tx can go out with the ranges I need.
What I want to do is set limits. The base limit will be 0 and the upper limit will be 16000. I would like the value to be set to 16000 if the value $tx goes over 16000 or below 0. I know this could be done on a per line basis by adding an if statementm but I have literaly got hundreds of lines of code I would need to work though.
Thank you very much in advance.
Mack.
Each $tx value will later be called indevidualy. I am guessing the code would need to e somethign like...
if ($t%% != >1) $$ ($t%% != <1600)
{
$t&& = "1600";
}
The code above is just an exaple of how I imagine it should work, and is not valid php :)
Thanks again.
Mack.