i used ur code and found no error even when i used == in line 3.
andis a wrong code. bez in this you are give $day the value "Sunday",and in this case the if-statement will be always executed.Code:if ($day="Sunday")
check asin this code too the if statement will be execute bez all you doing is telling the compiler that the value of $day variable is now 'monday' and not to check if $day is equal to 'monday'.Code:if($day = 'monday')
x == y;
tells the compiler to check if left hand side (x) of [ == ] is equal to the right hand side (y).
x=y;
tells the compiler that now the value of y is to given to x also.
i think the point is clear..![]()





Reply With Quote

Bookmarks