MasterACE14 Posted May 21, 2007 Share Posted May 21, 2007 ok, i'm a PHP n00b, but i'm wondering how this script, equals 28 ??? <?php if (10 == 10) { print 1 + 1; } else { print 2 + 2; } if (10 == 11) { print 3 + 3; } else { print 4 + 4; } ?> Quote Link to comment Share on other sites More sharing options...
jitesh Posted May 21, 2007 Share Posted May 21, 2007 Run following code. <?php echo "Run First If Condition<br>"; if (10 == 10) { print 1 + 1; echo "<br>"; } else { print 2 + 2; echo "<br>"; } echo "Run Second If Condition<br>"; if (10 == 11) { print 3 + 3; echo "<br>"; } else { print 4 + 4; echo "<br>"; } ?> Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted May 21, 2007 Author Share Posted May 21, 2007 lol, I see my simple mistake lol, How could I miss that (Sorry about double post, my PC hiccupped :-\ ) Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted May 21, 2007 Author Share Posted May 21, 2007 lol, I see my simple mistake now, can't believe I missed it! lol Thanks for the help , I don't think Im ever going to make a mistake like that again lol 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.