graham23s Posted September 9, 2007 Share Posted September 9, 2007 Hi Guys, damn my brain hurts lol firstly the value of $free = 20 im trying to do a little credit system but its gone wrong somewhere code: if(($free) > 15) { echo "$free <img src=\"images/grin.gif\">"; } elseif (($free) < 5) { echo "$free <img src=\"images/cry.gif\">"; } elseif (($free) == 0) { echo "<font color=red>0</font> No Credit Left!"; } else { echo "$free <img src=\"images/smile1.gif\">"; } if the credit is > 15 then display a grin icon, if its less than 5 a cry icon if its 0 then theres no credit left, the rest of the time just a normal smile gif can nayone see anyproblems? because i have < 5 it interefers with the == 0 code thansk guys Graham Link to comment https://forums.phpfreaks.com/topic/68567-solved-elseif-problems/ Share on other sites More sharing options...
noidtluom Posted September 9, 2007 Share Posted September 9, 2007 Try change ($free) into $free - Take away the brackets around it. Link to comment https://forums.phpfreaks.com/topic/68567-solved-elseif-problems/#findComment-344666 Share on other sites More sharing options...
graham23s Posted September 9, 2007 Author Share Posted September 9, 2007 thanks mate i got it goin:) Graham Link to comment https://forums.phpfreaks.com/topic/68567-solved-elseif-problems/#findComment-344695 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.