Php Conditional Statement Example
Hello,
As we speak, i we’ll present you php conditional assertion instance. This text gives you easy instance of php conditional assertion instance. you’ll study php conditional assertion instance.
This instance to i’m use in if situation,if..else situation,if…else if…else situation and final to make use of in change case conditional assertion use.
So let’s comply with few step to create instance of how you can dropzone add obtain button in php.
If Situation
<?php $t = 120; if ($t == "120") { echo "Have a superb day!<br>"; } ?>
if…elseif…else Situation
<?php $t = 120; if ($t != "120") { echo "Have a superb morning!<br>"; } elseif ($t == "120") { echo "Have a superb day!<br>"; } else { echo "Have a superb night time!<br>"; } ?>
Change..case Conditional
<?php $favcolor = "blue"; change ($favcolor) { case "crimson": echo "Your favourite shade is crimson!<br>"; break; case "blue": echo "Your favourite shade is blue!<br>"; break; case "inexperienced": echo "Your favourite shade is inexperienced!<br>"; break; default: echo "Your favourite shade is neither crimson, blue, nor inexperienced!<br>"; } ?>
I hope it’s going to help you…
Komentar
Posting Komentar