PHP Phrasebook

Paperback (Print)
Buy Used
Buy Used from BN.com
$17.61
(Save 29%)
Item is in good condition but packaging may have signs of shelf wear/aging or torn packaging.
Condition: Used – Good details
Used and New from Other Sellers
Used and New from Other Sellers
from $1.99
Usually ships in 1-2 business days
(Save 92%)
Other sellers (Paperback)
  • All (33) from $1.99   
  • Used (33) from $1.99   
Close
Sort by
Page 1 of 4
Showing 1 – 10 of 33 (4 pages)
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$1.99
Seller since 2010

Feedback rating:

(3896)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

Acceptable
Selection as wide as the Mississippi.

Ships from: St Louis, MO

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$1.99
Seller since 2005

Feedback rating:

(21880)

Condition: Good
Indianapolis, IN 2005-09-01 Trade Paperback Good Trade paperback (US). Glued binding. 309 p. Contains: Illustrations. Ex-Library expected imperfections.

Ships from: Sparks, NV

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$1.99
Seller since 2009

Feedback rating:

(10941)

Condition: Good
Book shows minor use. Cover and Binding have minimal wear and the pages have only minimal creases.A tradition of southern quality and service. All books guaranteed at the Atlanta ... Book Company. Our mailers are 100% recyclable. Read more Show Less

Ships from: Atlanta, GA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$1.99
Seller since 2014

Feedback rating:

(2619)

Condition: Very Good
Very good condition - book only shows a small amount of wear.Biggest little used bookstore in the world.

Ships from: Reno, NV

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$1.99
Seller since 2014

Feedback rating:

(2619)

Condition: Good
Book has some visible wear on the binding, cover, pages.Biggest little used bookstore in the world.

Ships from: Reno, NV

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$1.99
Seller since 2009

Feedback rating:

(7593)

Condition: Acceptable
Help save a tree. Buy all your used books from Green Earth Books. Read. Recycle and Reuse.

Ships from: Portland, OR

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$1.99
Seller since 2006

Feedback rating:

(60147)

Condition: Acceptable
Shows definite wear, and perhaps considerable marking on inside. 100% Money Back Guarantee. Shipped to over one million happy customers. Your purchase benefits world literacy!

Ships from: Mishawaka, IN

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$1.99
Seller since 2009

Feedback rating:

(6777)

Condition: Good
Only lightly used. Book has minimal wear to cover and binding. A few pages may have small creases and minimal underlining.Book selection as BIG as Texas.

Ships from: Dallas, TX

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$1.99
Seller since 2008

Feedback rating:

(595)

Condition: Very Good
Indianapolis, IN 2005 Trade paperback Very Good. Some overall wear from reading, has a few creases. Trade paperback (US). Glued binding. 309 p. Contains: Illustrations. ... Developer's Library. Read more Show Less

Ships from: Toledo, OH

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$1.99
Seller since 2006

Feedback rating:

(60147)

Condition: Good
Shows some signs of wear, and may have some markings on the inside. 100% Money Back Guarantee. Shipped to over one million happy customers. Your purchase benefits world literacy!

Ships from: Mishawaka, IN

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
Page 1 of 4
Showing 1 – 10 of 33 (4 pages)
Close
Sort by

Overview

If you were traveling in Spain, but couldn't speak Spanish very well, you'd probably carry a Spanish dictionary with you. If you are a PHP developer who needs a portable reference guide for frequent use in your job, the PHP Phrasebook is perfect for you. The PHP Phrasebook is actually a pocket guide that is jam-packed with useful and essential PHP code "phrases" for the PHP developer's everyday use. The code is flexible, so it can be easily adapted to your needs and mulitple situations, and your time isn't wasted wading through chapters of tutorial lessons and extraneous information. The phrasebook covers PHP 5 and is relevant for PHP 4.

Read More Show Less

Product Details

  • ISBN-13: 9780672328176
  • Publisher: Addison-Wesley
  • Publication date: 9/26/2005
  • Series: Developer's Library Series
  • Pages: 320
  • Product dimensions: 4.48 (w) x 7.02 (h) x 0.68 (d)

Meet the Author

Christian Wenz is professional developer, trainer and consultant with a focus on web technologies. He frequently contributes articles to renowned IT magazines and speaks at conferences around the world. Christian is Germany's very first Zend Certified Professional and contributes to several PHP packages in the PEAR repository. Christian has written or contributed to several books on PHP and related technologies, including PHP 5 Unleashed.
Read More Show Less

Read an Excerpt

Introduction

Some time ago, my favorite development editor, Damon Jordan, sent me an email and closed it with "Ich möchte eine Föhnwelle"—"I'd like a blow wave." Unfortunately, I didn't know what either a Föhnwelle or a blow wave is, so I declined. He then told me he had found this sentence in a German phrasebook he recently bought.

I was interested and had a look at some German phrasebooks. I think they are great tools to get around in a foreign country, although I personally think that some of the phrases offered just don't make sense. For instance, in one phrasebook, I found a series of pickup lines, including the ingenious "You have a beautiful personality," something that didn't work for me either in English, in German, or in any other language! Some coital guidance could also result in other problems—you either have to remember all the things to say while you are at it, or you have to hold the phrasebook in your free hand. And, finally, "Blow waves are as dead as a pet rock," just to use another phrase.

Anyway, we were discussing phrasebooks a bit, and Damon said that he wanted to do a book series on phrasebooks. He also mentioned that he would like to team up with his and my favorite acquisitions editor, Shelley Johnston, so I was in.

While working on a concept, we found some differences between a language phrasebook and an IT phrasebook. For instance, a language phrasebook just contrasts the same sentence in two languages. However, this is not always helpful. What if you want to change the phrase a bit, for instance if you want an en vogue blow wave (an oxymoron, one might say)?

So, we tried to create a concept that contains a lot of phrases, but all of them with good explanations so that it is easy to change the code and adapt it to one's needs. This, of course, makes the "foreign language" portions of a phrase a bit longer than the phrase itself, but we think that really helps when working with the book.

I also remember one famous Monty Python sketch in which someone uses a sabotaged dictionary, so that asking for directions results in getting roughed up. Therefore, it is vitally important to get a real explanation on what is going on within the phrase.

I then wrote a series concept and a sample chapter and now, only a few months later, you hold the first phrasebook in your hands, one of hopefully many.

Something I really hate about reading computer books is when code samples are hacked into the word processor, but never tested. To avoid this, every listing is also available for download at http://php.phrasebook.org/, and the filename is part of the listing's caption for phrases longer than just a few lines. So every code does exist as a file and has actually been tested, unlike in some other books. Of course, it's an illusion that this book is 100% error-free, although we have taken several steps to come very close to that mark. Any errata, if known, will be posted to that site, too.

Another thing I really dislike with some books is that they tend to be very OS-dependent, which is really unnecessary for PHP. Some books were obviously only tested under Windows, some others only under Linux, but it is possible to make code relatively platform-independent. We have invested a lot of effort in testing the code from this book on many server platforms, including Linux, Windows, Mac OS X, and Solaris. Therefore, the screenshots in this book are also taken from those platforms, so you will find a healthy mixture of systems (and browsers). Ideology can be expressed with many phrases, but you won't find any of them in this book. If, however, something does only run on certain platforms (or PHP versions), it is noted in the text. Another phrase I promise you will not find in this book is anything that looks like foo, bar, baz, or any other proofs of very little imagination.

Of course, it is easy to find missing phrases in this book—PHP offers so much functionality that it is impossible to cover every aspect. Therefore, we had to select certain topics of interest—stuff that is relevant in a PHP programmer's everyday work. If you think, however, that something has really been overlooked, please let me know—but do also nominate something that should then be removed from upcoming editions of this book to make room for the new phrase(s). I am looking forward to hearing your feedback.

And now, to quote once more a phrasebook: "Bist du soweit? Da boxt der Papst"—"Are you ready? It's all happening there" (but literally: "There boxes the pope").

Your personal phrasemonger,
Christian Wenz

© Copyright Pearson Education. All rights reserved.

Read More Show Less

Table of Contents

Introduction

1. Manipulating Strings.

Comparing Strings

Checking Usernames and Passwords

Converting Strings into Hypertext Markup Language (HTML)

Using Line Breaks

Encrypting Strings

Checksumming Strings

Extracting Substrings

Protecting Email Addresses Using ASCII Codes

Scanning Formatted Strings

Getting Detailed Information About Variables

Searching in Strings

Using POSIX Regular Expressions

Using Perl-Compatible Regular Expressions

Finding Tags with Regular Expressions

Validating Mandatory Input

Validating Numbers (and Other Data Types)

Validating Email Addresses

Search and Replace

2. Working with Arrays.

Accessing All Elements of Numerical Arrays

Accessing All Elements of Associative Arrays

Accessing All Array Elements in Nested Arrays

Turning an Array into Variables

Converting Strings to Arrays

Converting Arrays to Strings

Sorting Arrays Alphabetically

Sorting Associative Arrays Alphabetically

Sorting Nested Arrays

Sorting Nested Associative Arrays

Sorting IP Addresses (as a Human Would)

Sorting Anything

Sorting with Foreign Languages

Applying an Effect to All Array Elements

Filtering Arrays

Getting Random Elements Out of Arrays

3. Date and Time.

Using Text Within date()

Automatically Localizing Dates

Manually Localizing Dates

Using the Current Date the U.S./U.K./European Way

Formatting a Specific Date

Validating a Date

Calculating a Relative Date

Creating a Sortable Time Stamp

Converting a String into a Date

Determining Sunrise and Sunset

Using Date and Time for Benchmarks

Using Form Fields for Date Selection

Create Self-updating Form Fields for Date Selection

Calculating the Difference Between Two Dates

Using GMT Date/Time Information

4. Interacting with Web Forms.

Sending Form Data Back to the Current Script

Reading Out Form Data

Coping with "Magic Quotes"

Checking Whether a Form Has Been Submitted

Saving Form Data into a Cookie

Prefilling Text Fields and Password Fields

Prefilling Multiline Text Fields

Preselecting Radio Buttons

Preselecting Check Boxes

Preselecting Selection Lists

Preselecting Multiple Selection Lists

Processing Graphical Submit Buttons

Checking Mandatory Fields

Checking Selection Lists

Writing All Form Data into a File

Sending All Form Data Via Email

Getting Information About File Uploads

Moving Uploaded Files to a Safe Location

5. Remembering Users (Cookies and Sessions).

Understanding Cookies

Creating a Cookie

Reading Out Cookies

Getting Rid of "Magic Quotes" in Cookies

Setting a (Reasonable) Expiry Date

Setting a Client-Specific Expiry Date

Deleting a Cookie

Making Cookies Accessible for Several Domains

Checking Whether the Client Supports Cookies

Saving Multiple Data in One Cookie

Saving the User's Language Preference

Understanding Sessions

Where to Store the Sessions

How to Maintain the Session State

Activating Sessions

Reading and Writing Sessions

Closing Sessions

Changing the Session ID

Creating Dynamic, Session-Aware Links

Implementing a Custom Session Management

Creating a Secured Area with Sessions

Creating a Secured Area Without Sessions

6. Using Files on the Server File System.

Opening and Closing Files

Reading from Files

Writing to Files

Locking Files

Using Relative Paths for File Access

Avoiding Security Traps with File Access

Working with CSV Data

Parsing INI Files

Retrieving File Information

Copying, Moving, and Deleting Files

Browsing the File System

Using PHP Streams

Using Bzip2 Archives

Returning Files with an HTTP Request

7. Making Data Dynamic.

Connecting to MySQL

Connecting to MySQLi

Sending SQL to MySQL

Prepared Statements with MySQL

Retrieving Results of a Query to MySQL

Connecting to SQLite

Sending SQL to SQLite

Retrieving Results of a Query to SQLite

Connecting to PostgreSQL

Sending SQL to PostgreSQL

Updating Data in PostgreSQL

Retrieving Results of a Query to PostgreSQL

Connecting to Oracle

Sending SQL to Oracle

Retrieving Results of a Query to Oracle

Connecting to MSSQL

Sending SQL to MSSQL

Retrieving Results of a Query to MSSQL

Connecting to Firebird

Sending SQL to Firebird

Retrieving Results of a Query to Firebird

Connecting Via PDO

Sending SQL Via PDO

Retrieving Results of a Query Via PDO

8. Using XML.

Parsing XML with SAX

Using DOM in PHP 4 to Read XML

Using DOM in PHP 5 to Read XML

Using DOM in PHP 4 to Write XML

Using DOM in PHP 5 to Write XML

Using SimpleXML

Transforming XML with XSL and PHP 4

Transforming XML with XSL and PHP 5

Validating XML

9. Communicating with Others.

Connecting with HTTP Servers

Connecting with FTP Servers

Checking Whether a Server Is Still Reacting

Creating a Web Service with PEAR::XML-RPC

Consuming a Web Service with PEAR::XML-RPC

Creating a Web Service with NuSOAP

Automatically Generating WSDL with NuSOAP

Consuming a Web Service with NuSOAP

Creating a Web Service with PEAR::SOAP

Automatically Generating WSDL with PEAR::SOAP

Consuming a Web Service with PEAR::SOAP

Creating a Web Service with PHP 5's SOAP Extension

Consuming a Web Service with PHP 5's SOAP Extension

Index.

Read More Show Less

Preface

Introduction

Some time ago, my favorite development editor, Damon Jordan, sent me an email and closed it with "Ich möchte eine Föhnwelle"—"I'd like a blow wave." Unfortunately, I didn't know what either a Föhnwelle or a blow wave is, so I declined. He then told me he had found this sentence in a German phrasebook he recently bought.

I was interested and had a look at some German phrasebooks. I think they are great tools to get around in a foreign country, although I personally think that some of the phrases offered just don't make sense. For instance, in one phrasebook, I found a series of pickup lines, including the ingenious "You have a beautiful personality," something that didn't work for me either in English, in German, or in any other language! Some coital guidance could also result in other problems—you either have to remember all the things to say while you are at it, or you have to hold the phrasebook in your free hand. And, finally, "Blow waves are as dead as a pet rock," just to use another phrase.

Anyway, we were discussing phrasebooks a bit, and Damon said that he wanted to do a book series on phrasebooks. He also mentioned that he would like to team up with his and my favorite acquisitions editor, Shelley Johnston, so I was in.

While working on a concept, we found some differences between a language phrasebook and an IT phrasebook. For instance, a language phrasebook just contrasts the same sentence in two languages. However, this is not always helpful. What if you want to change the phrase a bit, for instance if you want an en vogue blow wave (an oxymoron, one might say)?

So, we tried to create a concept that contains a lot of phrases, but all of them with good explanations so that it is easy to change the code and adapt it to one's needs. This, of course, makes the "foreign language" portions of a phrase a bit longer than the phrase itself, but we think that really helps when working with the book.

I also remember one famous Monty Python sketch in which someone uses a sabotaged dictionary, so that asking for directions results in getting roughed up. Therefore, it is vitally important to get a real explanation on what is going on within the phrase.

I then wrote a series concept and a sample chapter and now, only a few months later, you hold the first phrasebook in your hands, one of hopefully many.

Something I really hate about reading computer books is when code samples are hacked into the word processor, but never tested. To avoid this, every listing is also available for download at http://php.phrasebook.org/, and the filename is part of the listing's caption for phrases longer than just a few lines. So every code does exist as a file and has actually been tested, unlike in some other books. Of course, it's an illusion that this book is 100% error-free, although we have taken several steps to come very close to that mark. Any errata, if known, will be posted to that site, too.

Another thing I really dislike with some books is that they tend to be very OS-dependent, which is really unnecessary for PHP. Some books were obviously only tested under Windows, some others only under Linux, but it is possible to make code relatively platform-independent. We have invested a lot of effort in testing the code from this book on many server platforms, including Linux, Windows, Mac OS X, and Solaris. Therefore, the screenshots in this book are also taken from those platforms, so you will find a healthy mixture of systems (and browsers). Ideology can be expressed with many phrases, but you won't find any of them in this book. If, however, something does only run on certain platforms (or PHP versions), it is noted in the text. Another phrase I promise you will not find in this book is anything that looks like foo, bar, baz, or any other proofs of very little imagination.

Of course, it is easy to find missing phrases in this book—PHP offers so much functionality that it is impossible to cover every aspect. Therefore, we had to select certain topics of interest—stuff that is relevant in a PHP programmer's everyday work. If you think, however, that something has really been overlooked, please let me know—but do also nominate something that should then be removed from upcoming editions of this book to make room for the new phrase(s). I am looking forward to hearing your feedback.

And now, to quote once more a phrasebook: "Bist du soweit? Da boxt der Papst"—"Are you ready? It's all happening there" (but literally: "There boxes the pope").

Your personal phrasemonger,
Christian Wenz

© Copyright Pearson Education. All rights reserved.

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)