In the code below in bold I only want to perform this calculation if $winnings > 0. How would I code this? if ($info['stakeback'] == 'Y') { $user_fee = ($winnings - $fee - $info['samount']) * ($info['spercent'] / 100) ; $user_fee = ($user_fee + $info['samount']) ; }
if ($info['stakeback'] == 'Y') { $user_fee = ($winnings - $fee - $info['samount']) * ($info['spercent'] / 100) ; if ($winnings>0) $user_fee = ($user_fee + $info['samount']) ; } PHP: or am i missing something?