PHP Cookbook
Publisher: O'Reilly Media
Released: November 2002
Pages: 640

PHP is a simple yet powerful open source scripting language that has become a big player in web development. Over a million web sites, from large corporate sites to small personal sites, are using PHP to serve dynamic web content. PHP's broad feature set, approachable syntax, and support for different operating systems and web servers make it an ideal language for rapid web development.

The PHP Cookbook is a collection of problems, solutions, and practical examples for PHP programmers. The book contains a unique and extensive collection of best practices for everyday PHP programming dilemmas. For every problem addressed in the book, there's a worked-out solution or "recipe" -- short, focused pieces of code that you can insert directly into your applications. But this book offers more than cut-and-paste code. You also get explanations of how and why the code works, so you can learn to adapt the problem-solving techniques to similar situations.

The recipes in the PHP Cookbook range from simple tasks, such as sending a database query and fetching URLs, to entire programs that demonstrate complex tasks, such as printing HTML tables and generating bar charts. This book contains over 250 recipes on the following topics:

  • Working with basic data types, including strings, numbers, dates and times, and arrays
  • PHP building blocks, such as variables, functions, classes, and objects
  • Web programming, including forms, database access, and XML
  • Useful features like regular expressions, encryption and security, graphics, internationalization and localization, and Internet services
  • Working with files and directories
  • Command-line PHP and PHP-GTK
  • PEAR, the PHP Extension and Application Repository
This book contains an impressive collection of useful code for PHP programmers, from novices to advanced practitioners. Instead of poking around mailing lists, online documentation, and other sources, you can rely on the PHP Cookbook to provide quick solutions to common problems, so you can spend your time on those out-of-the-ordinary problems specific to your application.
Table of Contents
Product Details
About the Author
Colophon
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
oreillyPHP Cookbook
 
4.2

(based on 11 reviews)

Ratings Distribution

  • 5 Stars

     

    (4)

  • 4 Stars

     

    (6)

  • 3 Stars

     

    (0)

  • 2 Stars

     

    (1)

  • 1 Stars

     

    (0)

Reviewed by 11 customers

Sort by

Displaying reviews 1-10

Back to top

Previous | Next »

(1 of 1 customers found this review helpful)

 
5.0

Concise approach to using PHP

By Zac

from Portland, OR

About Me Developer

Verified Reviewer

Pros

  • Accurate
  • Concise
  • Easy to understand
  • Helpful examples
  • Well-written

Cons

    Best Uses

    • Intermediate
    • Novice

    Comments about oreilly PHP Cookbook:

    Not just a cookbook but a how-to for every aspect of PHP programming, including the most common approaches for working with each and every PHP data type.
    Logically organized by PHP feature, the book covers the basics of working with strings, numbers, dates and times, arrays and functions. Each section summarizes the unique aspects of each PHP component.
    By far the most useful section of the book is a full discussion of PHP classes and how to write them. If you are new to class-based code, this book provides an excellent introduction and then very thoroughly provides examples of working with classes: abstract class, overriding properties, method polymorphism, etc.

    The sections on filing handling were indispensable for me when I needed to work with files on the server, as were the sections on Sessions and Data Persistence, Security and Encruption, Graphics (for dynamically scaling graphics on the fly, especially), and Regular Expressions.

    The only section I did not enjoy and use as much was the section on Database Access, perhaps because I have not been in environments where we were using PDO, so a lot of the examples weren't helpful to me personally.

    I feel this is really an essential guide to demonstrating how to handle the most common uses of PHP, whether its how to delete array elements or instantiating a class or creating a user session.

    Very informative, clearly written and well-organized.
    Be sure to get the 2nd edition, which includes PHP 5. It was released in 2006 so at the time of this writing, is already 6 years old, but I would say it is still extremely relevant and useful and not significantly "dated"

     
    4.0

    Wow!

    By Munchahat Development Team

    from Undisclosed

    Comments about oreilly PHP Cookbook:

    The PHP Cookbook is one of the better books for PHP I've seen. It covers a wide range of topics and talks about things that most books don't. It was very up to date and extermley helpful. It really helped me solve my programming problems.

     
    4.0

    Great book

    By Anonymous

    from Undisclosed

    Comments about oreilly PHP Cookbook:

    I was extremely happy with this book. I am actually new to PHP, but with knowledge of html and asp, this is the perfect reference.

    If you need to use PHP to do FTP, you may find that page 442 is missing. I called Customer Service and they sent me this link right away:

    http://examples.oreilly.com/phpckbk/ch17_442.pdf

    (1 of 1 customers found this review helpful)

     
    5.0

    PHP Cookbook Review

    By Mads B. Rasmussen

    from Undisclosed

    Comments about oreilly PHP Cookbook:

    I can't but help giving this book the highest marks possible. I've read a quite a few books on the subject and this one is by far the most useful.

    If provides examples and explainations for almost situation you could imagine.

    I read it from front to back, and now I use it as a refference along with online manuals and the sorts. Great for "real life" web application development. Leave the hardcore theory for the PHD's :).

     
    5.0

    PHP Cookbook Review

    By Marie Mazerolle

    from Undisclosed

    Comments about oreilly PHP Cookbook:

    This is the most useful book I've ever bought! I've read it from cover-to-cover, and I used a LOT of recipes. It was my first cookbook, but since then I've also bought the java cookbook. I just wish there were more books in that collection.

    (0 of 1 customers found this review helpful)

     
    2.0

    PHP Cookbook Review

    By Fred Darel

    from Undisclosed

    Comments about oreilly PHP Cookbook:

    Easy to ready but poor examples. Should follow MySQL CookBook - this one an execellent one: good examples with explanation.

     
    5.0

    PHP Cookbook Review

    By Jono Bacon

    from Undisclosed

    Comments about oreilly PHP Cookbook:

    I am a professional writer asnd web developer, and I find this book is one of the most fantastic books I have ever used. Virtually every PHP problem I encounter has been answered to some extent with the book. If the book does not give the complete solution, it puts you in the right direction.

    There is a good amount of information in this book, and provides a easy access method for getting what you need. If you code with PHP, get this - you won't regret it.

     
    4.0

    PHP Cookbook Review

    By Anonymous

    from Undisclosed

    Comments about oreilly PHP Cookbook:

    I'm a beginner in PHP. I read this book every day now and I find it very useful and well written. PHP Cookbook gives the reader a Q&A approach to PHP, which is practical and easy.

     
    4.0

    PHP Cookbook Review

    By Kenneth Wilcox

    from Undisclosed

    Comments about oreilly PHP Cookbook:

    This book has a little bit of everything. It may not taste as good as something you can make with Betty Crocker, but the end result is the same. I've used several examples in my php pages already. (Who knew if (8 = = $myvar) would solve potential problems) I was disappointed with one example so far, it answered the question with a php class with no example of how to implement that class. Now with a little hacking you can figure it out, but I was hoping these recipes would have the solution all hacked out for you. Still an excellent book, and worth getting, but like all version 1 releases, it could use some more work.

    (1 of 1 customers found this review helpful)

     
    4.0

    PHP Cookbook Review

    By joseph

    from Undisclosed

    Comments about oreilly PHP Cookbook:

    A very, very good book. I recommend this text with no hesitation.

    Displaying reviews 1-10

    Back to top

    Previous | Next »

     
    Buy 2 Get 1 Free Free Shipping Guarantee
    Buying Options
    Immediate Access - Go Digital what's this?