PhpRiot
Browse Articles
Ajax (4), APC (1), CAPTCHA (1), CSS (3), Debugging (1), File Upload (1), Google (3), Google Maps (2), JavaScript (12), JSON (2), MVC (1), MySQL (7), onbeforeunload (1), OOP (1), PHP (28), PhpDoc (1), PostgreSQL (6), Prototype (11), Reflection (1), RFC 1867 (1), Robots (1), Scriptaculous (1), SEO (1), Sessions (1), SimpleXML (1), Smarty (5), SOAP (1), SPL (1), Templates (2), W3C (1), XHTML (1), Zend Framework (1), Zend_Search_Lucene (1)

Buy My Book
Practical Web 2.0 Applications with PHP

Practical Web 2.0 Applications with PHP

Want to assert yourself as a cutting–edge PHP web developer? Take a practical approach...

Learning PHP 5

Learning PHP 5
  • Media: Book (Paperback, 368 pages)
  • ISBN: 0596005601
  • Publisher: O'Reilly Media, Inc.
  • Release Date: Jul 20, 2004

Buy from Amazon Buy from Amazon


Product Description

PHP has gained a following among non-technical web designers who need to add interactive aspects to their sites. Offering a gentle learning curve, PHP is an accessible yet powerful language for creating dynamic web pages. As its popularity has grown, PHP's basic feature set has become increasingly more sophisticated. Now PHP 5 boasts advanced features--such as new object-oriented capabilities and support for XML and Web Services--that will please even the most experienced web professionals while still remaining user-friendly enough for those with a lower tolerance for technical jargon.

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.


Rating: 5/5 Amazing Learning PHP 5

This books is amazing for the people who want know the new features in PHP 5
Submitted 30 Oct 2007

Rating: 5/5 Great resource

Easy read. There are also so many examples, that I just want to test each one out. I highly recommend for anyone who doesn't know anything about PHP.
Submitted 10 May 2007

Rating: 4/5 Happy to meet the challenge...

I cheated. I looked in the back of the book for the answers so I could understand the programmer's mind behind the solution. I'm getting so much out of this book! Now, I'll think of a problem I need to solve, and because I took the time to learn some fundementals, I can piece together solutions in my head, which test positive when coded and loaded. A very satisfying experience all around. Reverse engineer is the way to learn!

May the parse be with you!
Submitted 23 Mar 2007

Rating: 4/5 A note for Perl jocks

If you can't install all the Perl modules you want (say on a $12.99/month commercial host), give PHP a try. It has weaknesses and strengths vis-à-vis Perl, but you can use both! They work well together, and with XHTML, CSS, and MySQL. Who says you have to choose one over the other?

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
Submitted 3 Feb 2007

Rating: 3/5 some good tricks

If you're in a Windows shop, save yourself a lot of pain: download EasyPHP (mentioned on p. 261). Then substitute a version 5.2 php for C:\EasyPHP\php (which is version 4.3) . HINT: EasyPHP uses the php.ini in the conf-files dir, not the one in the php.
Submitted 5 Dec 2006

You May Also Like ...


Programming PHP

PHP Cookbook (Cookbooks (O'Reilly))


Learning PHP and MySQL (Learning)