PHP Programs

PHP Program for If else statement

In this program we use if-else statement to check today is weekend or not.

If else are flow controls statement in which block of code execute only if condition satisfy or not.




<title>IF...Else Example</title>






    echo"Have a nice weekend!";


    echo"Have a nice day!";




When Run The Program Following Output:

See In Following Window


In above program if today is Friday that time it prints "Have a nice weekend!" If day is other than Friday then "Have a nice day will print on screen.

Releted Programs

© 2017 codewmAll rights reserved.