Quote Originally Posted by melbin View Post
http://php.flashwebhost.com/melbin/days.php

PHP Code:
<?php
$day
='Sunday';
if (
$day="Sunday") {
    echo 
'Have a nice Sunday';
}

else {
    echo 
'Have a nice day';
}
In this code when i use == on line no:3 i am getting the result as FALSE. Why ?
= is assignment operator, that means you are just assigning a value to variable $day.

Use == operator to check if value is same or not.


Quote Originally Posted by melbin View Post
Doubt 2

Is it possible to get the day by using PHP date and time function ?
It is possible using date() function.