Learning PHP 5 was actually a really enjoyable read until I got into the meat of the book where the code examples just didn’t work. I did fix quite a few errors with the help of the online errata. Initially most were undefined variable errors then it got a little to complex and I gave up reading at that point.
PHP Cookbook is excellent for snippets of code but be aware, I had the same problem with Learning PHP 5. Code examples not working properly. I dove straight into the form section as I have an assignment that involves form validation and the section on ‘Redisplaying Forms with Inline Error Messages’ was abysmal.