Ok to explain what is happening “$total” is an equation of a percentage that im mulitplying with the “$value” if the total is greater than 100% it makes the number bigger than 333, 300, 166. I don’t want the values to be any bigger than the array values. I know the below code works.
[php]
<?php $arkonor1 = array("$mega" => 333, "$trit" => 300, "$zyd" => 166); ?>You Get | Gross | Station Fee | Net | |
<?php include('name.php'); ?> | ||||
$key1 | $get |
so i was thinking of adding something like this but was unsure how to do it any suggestions.
[php]
<?php if ($get >= 333) echo "333"; else echo $get; ?>[/php]
my other problem is I need to make the value a variable for other things that i need to do to it. So if the percentage is equal to 97% it take (333*.97) = 323.01 and then make this a variable. Hope i was able to explain it ok to understand. Thank in advance