Bernie,
Welcome to PHPBuilder! I do hope you find people here helpful and basically friendly 🙂
Unfortunately, there are often problems in many programming books that are aimed at a particular language, especially if they're trying to be "up to date" and constantly adding material.
Several long-time members of this site, in fact, have published one or more books regarding PHP, and one of the problems they mentioned is that they have "RUSH" deadlines from the publisher, who then gives their text to be retyped by their own secretaries using Microsoft Word (or similar) which often "auto-corrects" entities in their sample code, and, of course, these typists know very little about PHP code.
Feel free to post your code and questions here: please do use the
tags around your code, as it keeps the forum's format intact AND allows us to see certain error conditions in your code due to the color/highlighting.
Again, welcome to PHPBuilder!