Coding error in the book
There is an error in one of the book's (Beginning PHP5) examples:
In chapter 3, section "The Concept of State", and "Try It Out: Count Page Accesses".
In this "if" statement:
if (isset ($_GET['whichpage']) == $i)
if $_GET['whichpage'] is set, then regardless of the page number ($i), this 'if' will be true! but we just want this for the current page.
The solution can be this one:
if ($_GET['whichpage'] == $i)
|