PHP by Example

PHP by Example

3.4 (5 ratings by Goodreads)
By (author) 

List price: US$31.99

Currently unavailable

Add to wishlist

AbeBooks may have this title (opens in new window).

Try AbeBooks


PHP By Example will provide web-publishing oriented individuals the opportunity to learn a new, flexible Internet scripting language, PHP. This book will take the reader through step-by-step examples that will help them gain an understanding of PHP. PHP By Example will:

Explain concepts in simple, understandable tasks with multiple approaches to concepts that need clarification.
Encourage and train the reader to break problems down into logical steps.
show more

Product details

  • Paperback | 432 pages
  • 188 x 231.6 x 24.6mm | 703.08g
  • Que Corporation,U.S.
  • United States
  • English
  • 0789725681
  • 9780789725684

Table of contents


1. Welcome to PHP.

Why PHP? If You're New to Programming.... Writing a Basic PHP Program. Server-Side Versus Client-Side Scripting. Running Your New Program.

2. Variables and Constants.

Introduction to Variables and Constants. Declaration and Assignment. Variable Types. Scope. Type Casting. Variable References.

3. Program Input and Output.

Revisiting Output. Program Input.

4. Arithmetic.

Basic Arithmetic. Order of Operations. Compound Operators. Patterns and Arithmetic.

5. String Manipulation.

Before We Begin. The String Concatenation Operator. String Functions. Pattern Matching with Regular Expressions.


6. The if, elseif, and else Statements.

Basic Conditionals. Expressing Multiple Conditions. Short Circuit Evaluation.

7. The switch Statement.

Introducing the switch Statement. Multifunction Pages.

8. Using while and do-while.

The while Statement. The do-while Statement. The break and exit Statements. What's Next.

9. Using for and foreach.

The for Statement. Syntax. Comparing for and while. The foreach Statement.


10. Functions.

Understanding Functions. Passing Values to and from Functions. Referenced Parameters. Recursive Functions.

11. Classes and Objects.

What Are Classes and Objects? Object-Oriented Programming Concepts. serialize() and unserialize(). Subclasses and Inheritance. What's Next.

12. Using Include Files.

Understanding include. Why Use includes? What's Next.


13. Creating Dynamic Content with PHP and a MySQL Database.

A Word about Databases. The Idea Behind Database-Driven Content. Designing and Creating a Table in MySQL. Using MySQL to Make Your Web Site Come Alive.

14. Using PHP for Password Protection

Goals of Authentication with PHP. Setting Up the Basics. Verifying the Username and Password. Practical Techniques. Using HTTP Header Authentication. What's Next.

15. Allowing Visitors to Upload Files.

File Upload Process Overview. Creating a File Upload Form. Handling the File Upload Request. What's Next.

16. Cookies.

Cookie Overview. Setting Cookies. What's Next.

17. Putting It All Together.

Writing a Full Program. Setting Up the Database. The Guestbook Program. What's Next.


Appendix A. Debugging and Error Handling.

Understanding Error Messages. Variable Tracking.

show more

About Toby Butzon

Toby Butzon is an experienced developer with a unique interest in Web programming. His constant use of Web scripting for many years has given him a thorough understanding of the subject. Being primarily self-taught, he knows which programming concepts are more difficult than others and has developed methods of teaching those concepts to minimize any difficulties for those new to programming.

Toby is fluent in scripting languages such as PHP, ASP, and Perl, and he works comfortably in C/C++ on both Windows and Linux. He also has experience designing databases for Microsoft SQL Server and MySQL. Integrating databases into Web sites is so common for him that it's almost second nature (right behind coding some good ol' PHP).
show more

Rating details

5 ratings
3.4 out of 5 stars
5 40% (2)
4 0% (0)
3 40% (2)
2 0% (0)
1 20% (1)
Book ratings by Goodreads
Goodreads is the world's largest site for readers with over 50 million reviews. We're featuring millions of their reader ratings on our book pages to help you find your new favourite book. Close X