> if($day = $system_day){
>
>the problem i am experiencing is that it seems the "if" statement is setting
>the $day value to equal $system_day instead of comparing their values....
>if i add
That's because you have only one = sign there.
= by itself does the assignment (setting a value)
== does comparison.
Sometimes, you do *both* an assignment and "test" the "answer" in a single
line like this:
if ($row = mysql_fetch_row($result)){
Here, the = does an "assignment" (sets the value) and then the *VALUE* is
tested to see if there is something there or not.
The = sign is only roughly similar to = in Mathematics.
Or, perhaps it would be better to say that:
= is like "Suppose x = 5. Then..."
== is like "Is x = 5?"
--
Like Music? http://l-i-e.com/artists.htm
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php