Sebastopol, CA--Although good chefs tend to work from the knowledge they keep in their heads, the practice of cooking is such that at some point they all had to learn from the expertise of others. Even the best chefs refer to cookbooks occasionally, whether to master new techniques or brush up on those they seldom use. In programming, as in cooking, you can learn much but not everything from trial and experimentation. There are always times when programmers will want to study best practices worked out by others or follow a solution to a common problem rather than expend the effort to solve it on their own. PHP programmers will find that the impressive collection of code in the new "PHP Cookbook" (O'Reilly, US $39.95) by David Sklar and Adam Trachtenberg provides quick "recipes" to help them put their programming skills to the most productive use possible.
The "PHP Cookbook" contains a unique and extensive collection of solutions and best practices for everyday PHP programming dilemmas. For each problem addressed in the book, there's a solution--a short, focused piece of code that programmers can insert directly into their applications. But the book goes beyond cut-and-paste code. Like any good cookbook, it expounds theory and offers clear explanations of why the code works, so readers can learn to adapt the problem-solving techniques to similar situations.
"Our book is intended to help readers build applications quicker," explains coauthor Trachtenberg. "Instead of poking around on mailing lists, web documentation, or lots of other sources, they can rely on the 'PHP Cookbook' as a trusted source for problem solving so they can get their work done more quickly."
Trachtenberg adds, "The cookbook format makes it very easy to find a specific solution to a problem. PHP lets you do so many neat things, and with a cookbook, developers can spend their time on those out-of-the ordinary problems that are specific to their application because they'll be able to find solutions to the common problems in the Cookbook."
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 more than 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 such as 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
Both advanced PHP programmers and novices will find time-saving solutions and new techniques in the "PHP Cookbook." Whether they choose to use the Cookbook's recipes directly, as a source of ideas, or as a way to learn more about PHP and what can be done with it, PHP programmers will find that this book quickly earns a valued spot in their library.
"PHP Cookbook" is also available on the O'Reilly Network Safari Bookshelf
An article by coauthor David Sklar: Trip Mapping with PHP
Chapter 8, Web Basics is available free online
For over 40 years, O’Reilly has provided technology and business training, knowledge, and insight to help companies succeed. Our unique network of experts and innovators share their knowledge and expertise through the company’s SaaS-based training and learning platform. O’Reilly delivers highly topical and comprehensive technology and business learning solutions to millions of users across enterprise, consumer, and university channels. For more information, visit www.oreilly.com.