gevo12321 Posted December 12, 2008 Share Posted December 12, 2008 I was wondering if you have the following: the chair is blue the floor is red if the chair is blue then bla else if the floor is red then bla else bla so since the first is true, does it automatically skip the rest of the things or does it still check if they r also true? Quote Link to comment https://forums.phpfreaks.com/topic/136718-solved-if-statments/ Share on other sites More sharing options...
mmarif4u Posted December 12, 2008 Share Posted December 12, 2008 If the 1st one is true, it will skip the rest. and so on for others.if i am not mistaken. Quote Link to comment https://forums.phpfreaks.com/topic/136718-solved-if-statments/#findComment-713941 Share on other sites More sharing options...
Maq Posted December 12, 2008 Share Posted December 12, 2008 Yes, because you have elseif. If you want to evaluate each step then you need: if(blue) if(red) else Quote Link to comment https://forums.phpfreaks.com/topic/136718-solved-if-statments/#findComment-713943 Share on other sites More sharing options...
gevo12321 Posted December 12, 2008 Author Share Posted December 12, 2008 thank you Quote Link to comment https://forums.phpfreaks.com/topic/136718-solved-if-statments/#findComment-713944 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.