I have just worked through this example and could not get the PHP to work.
The instructions say to enter
I believe the ; on the 3 examples needs to be replaced by ?>
As a newcomer to php I would like to see the complete index.php file, when it did not work I was not sure whether I had put it in the wrong place, in the body not the heaer etc.