Advertisement
touhid_xml

nion 001 Control Structure

Jan 24th, 2018
433
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. $name = 'Nionx'; //String
  4. $age = 17; // integer
  5. $married = false; // boolean
  6.  
  7.  
  8. //Check the name is Nion or not
  9. if($name == 'Nion'){
  10. echo "You are Nion<br />\n";
  11. //Check Nion is adult or not
  12. if($age >=18){ // chech age greater than or equal 18
  13. echo "You are adult<br />\n";
  14.     if($married == true){
  15.         echo "You are married<br />\n";
  16.     }else{
  17.             echo "You are not married<br />\n";
  18.     }
  19. }else{
  20.     echo "You are not adult.<br />\n";
  21. }
  22.  
  23. }else{
  24.     echo "You are not Nion.<br />\n";
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement