Microsoft Word - Core PHP Programming Using PHP to Build Dynamic Web Sites

(singke) #1

Again the current date is tested for being a Friday. Eventually, currentDate will be a
Friday and the loop will end. But what if I had done something silly such as comparing
the current date to "Workday"? There is no weekday with that name, so the expression
will always be true. That is, date("l", $currentDate) != "Workday" must always be

Free download pdf