In the Function Index (pg. 161), array_key_exists() is listed as page 82. However, it is actually on page 79.
Feel free to submit a correction yourself if you find any!
In the book, the print_r() function is described as follows:
Output the contents of $variable . Typically used to display the contents of an array.
However, there is also an optional flag for the print_r() function that makes the function return the output rather than printing it to the screen. Therefore, the section of the book should be amended as follows:
return – [optional] $boolean default: FALSE, print output
Output the contents of $variable. Typically used to display the contents of an array. If return is set to TRUE, print_r() returns the output rather than displaying it, such as when storing it in a variable.
The function has the following correct syntax:
mysql_result(resource, row[, column])
However, in the explanation paragraph, 2nd sentence, it uses the term field erroneously instead of the term column. It should read as follows:
If column is specified instead of the value of the
first column, the specified column is retrieved (can be referenced by number
starting with 0 or by name/alias).
It’s the little things, like changing the term used to be clearer to the reader and forgetting to update everything.
\w – Letter (a-z, A-Z)
\w – Letter, Digit, Underscore [a-zA-Z0-9_]
This is similar to the syntax for alphanumeric: [:alnum:]
The description in the book reads:
$_SERVER[‘QUERY_STRING’] – The current scripts path
This description is the same as the entry above, because I made a bad edit (copy/paste for formatting). The correct description would be as follows:
$_SERVER[‘QUERY_STRING’] – The current query string (without the question mark)
The example is correct and accurate, and luckily this is painfully obvious thanks to the name of the key QUERY_STRING in the $_SERVER array.