BrianM Posted April 23, 2008 Share Posted April 23, 2008 Can this be done, multiple elseif statements. Something along these lines... <?php if ... else ... elseif ... elseif ... elseif ... elseif ... elseif ... elseif ... Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted April 23, 2008 Share Posted April 23, 2008 <?php if ... elseif ... elseif ... elseif ... elseif ... elseif ... elseif ... else ... the else always has to go last. I think, don't quote me on that. note you could just use the switch statement instead Regards ACE Quote Link to comment Share on other sites More sharing options...
BrianM Posted April 23, 2008 Author Share Posted April 23, 2008 Heh, can somebody confirm this, please? Quote Link to comment Share on other sites More sharing options...
allistera Posted April 23, 2008 Share Posted April 23, 2008 if (Condition) { //code } elseif (Condition) { //code } elseif (Condition) { //code } else { //code } Quote Link to comment Share on other sites More sharing options...
BrianM Posted April 23, 2008 Author Share Posted April 23, 2008 Alright, thank you very much! =] Quote Link to comment Share on other sites More sharing options...
BrianM Posted April 23, 2008 Author Share Posted April 23, 2008 Actually one more thing, does the last statement have to be an else or can it also be elseif? Quote Link to comment Share on other sites More sharing options...
allistera Posted April 23, 2008 Share Posted April 23, 2008 It doesn't need to be a else, it can be elseif or else if Quote Link to comment 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.