• My PHP Pages

    This is a complete and free PHP programming course for beginners. Everything you need to get started is set out in section one below.

Jun 17, 2013

Posted by Unknown
No comments | 4:08 AM
PHP also has if else , while , do while and for statements.
lets see how to write a simple if else statement. i am not going to talk in depth about this statements  since php statements are same as other programming languages


<?php

$today =  date_format(date_create(date("y-m-d")), 'l');

echo "Today is : ".$today."<br>";

if ($today != 'sunday' or $today != 'saturday')
{
  echo "Have a nice day !";
}
else
{
echo "Have a nice weekend !";
}


?>

Please don't mind about data function that i have used. i will explain about data functions later.
you can try to write codes using other statments. if any problem please contact me through email - rajika4ever@gmail.com




0 comments :

Post a Comment