Learning PHP 5
- Media: Book (Paperback, 368 pages)
- ISBN: 0596005601
- Publisher: O'Reilly Media, Inc.
- Release Date: Jul 20, 2004
Product Description
If you've wanted to try your hand at PHP but haven't known where to start, then "Learning PHP 5" is the book you need. If you've wanted to try your hand at PHP but haven't known where to start, then "Learning PHP 5" is the book you need. With attention to both PHP 4 and the new PHP version 5, it provides everything from a explanation of how PHP works with your web server and web browser to the ins and outs of working with databases and HTML forms. Written by the co-author of the popular "PHP Cookbook," this book is for intelligent (but not necessarily highly-technical) readers. "Learning PHP 5" guides you through every aspect of the language you'll need to master for professional web programming results. This book provides a hands-on learning experience complete with exercises to make sure the lessons stick.
"Learning PHP 5" covers the following topics, and more:
How PHP works with your web browser and web server
PHP language basics, including data, variables, logic and looping
Working with arrays and functions
Making web forms
Working with databases like MySQL
Remembering userswith sessions
Parsing and generating XML
Debugging
Written by David Sklar, coauthor of the "PHP Cookbook" and an instructor in PHP, this book offers the ideal classroom learning experience whether you're in a classroom or on your own. From learning how to install PHP to designing database-backed web applications, "Learning PHP 5" will guide you through every aspect of the language you'll need to master to achieve professional web programming results.
Amazing Learning PHP 5
Great resource
Happy to meet the challenge...
May the parse be with you!
A note for Perl jocks
After scouring the web for tutorials and sample code, I think this book is the quickest way to get up to speed. It is concise with excellent code samples, warnings of pitfalls, and techniques for thwarting adversaries (hackers). It is straightforward without annoying cuteness or humor.
PHP code lives entirely within a web page. Some advantages:
1. You don't have to make print statements for all the HTML on the page; the PHP code can be inserts in the HTML.
2. Flow control. A page can include its own associated programming logic for easier maintenance and an uncluttered webroot directory. A form page can recursively call itself, instead of a separate script, for processing, and can call other pages.
3. It's embarrassingly *EASY* to learn with this book!
Some instructions just changed names (split is "explode," next is "continue") but other instructions are new and super-handy for the web! Sessions and cookie-handling are built in to the language (chapter 8). Scope rules and data structures are different; you can't shift, pop, or test for undef, but you get two-dimensional arrays.
If you go this route I guarantee you will have read this entire book, plus some of the online PHP manual, by the time your site is done. This book is not comprehensive but selects an excellent breadth of features.
One typo is unforgivable, and for that I unapologetically deduct a star: the very first database example in Chapter 1 shows $db->numrows() without the parentheses, which does not work. I spent two days trying to figure out what was wrong. Very confusing since the old way of doing it (before PHP's PEAR extensions) was mysql_num_rows <--without parentheses.
TIP: Do NOT assume that your host is on PHP 5! Though mine advertises 5, they put you on 4 unless you ask for 5. This one-line program will tell you which version you're on:
TIP #2: Blank web page got you down? You can see the syntax error by running it from a command line, like this: php5 mypage.php




some good tricks




