Home | Programming | Php
Yesterday I introduced If/Else Programming Logic. Today I'd like to show a more complicated example invloving nested conditional statements. What this means is that you can include If/Else statements within your If/Else statements to allow for even more complex programming logic. Let's look back at the example from yesterday but make it a bit more complex using nexted conditionals:
<?php if ($newMember) { if($uniqueUserID) { $sendWelcomeEmail = True; } else { print "User name taken"; } } else { $sendWelcomeEmail = False; print "Already a member!"; } ?>
Article Source: http://www.writerdatabase.com
www.webdevnotes.com/nested-ifelse-conditional-statements/
Please Rate this Article
5 out of 54 out of 53 out of 52 out of 51 out of 5
Not yet Rated