refiking Posted January 18, 2008 Share Posted January 18, 2008 I already have the if statement. What I need help with is the else statement. If $error > 0 is what I want to get done. Here is the snippet of code: if($error == 0){ Quote Link to comment https://forums.phpfreaks.com/topic/86703-solved-if-else-help/ Share on other sites More sharing options...
revraz Posted January 18, 2008 Share Posted January 18, 2008 if($error == 0){ //do code on 0 } elseif ($error > 0){ //do code if over 0 } else { //$error is not greater than 0 or equl to 0 } Quote Link to comment https://forums.phpfreaks.com/topic/86703-solved-if-else-help/#findComment-443074 Share on other sites More sharing options...
tet3828 Posted January 18, 2008 Share Posted January 18, 2008 if ($error == 0) { actions to carry out if $error is equal to zero } else { actions to cary out if $error is equal to anything else } Quote Link to comment https://forums.phpfreaks.com/topic/86703-solved-if-else-help/#findComment-443077 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.