- ISBN: 9780672329166 | 0672329166
- Cover: Paperback
- Copyright: 10/1/2008
Lead Authors
Laura Thomson is a senior software engineer at Mozilla Corporation. She was formerly a principal at both OmniTI and Tangled Web Design, and she has worked for RMIT University and the Boston Consulting Group. She holds a Bachelor of Applied Science (Computer Science) degree and a Bachelor of Engineering (Computer Systems Engineering) degree with honors.
Luke Welling is a web architect at OmniTI and regularly speaks on open source and web development topics at conferences such as OSCON, ZendCon, MySQLUC, PHPCon, OSDC, and LinuxTag. Prior to joining OmniTI, he worked for the web analytics company Hitwise.com, at the database vendor MySQL AB, and as an independent consultant at Tangled Web Design. He has taught computer science at RMIT University in Melbourne, Australia, and holds a Bachelor of Applied Science (Computer Science) degree.
Contributing Authors
Julie C. Meloni is the technical director for i2i Interactive (www.i2ii.com), a multimedia company located in Los Altos, California. She has been developing web-based applications since the Web first saw the light of day and remembers the excitement surrounding the first GUI web browser. She has authored numerous books and articles on web-based programming languages and database topics, including the bestselling Sams Teach Yourself PHP, MySQL and Apache All in One.
Adam DeFields is a consultant specializing in web application development, project management, and instructional design. He lives in Grand Rapids, Michigan where he runs Emanation Systems, LLC, a company he founded in 2002. He has been involved with web development projects using several different technologies, but has developed a strong preference toward PHP/MySQL-based projects.
Marc Wandschneider is a freelance software developer, author, and speaker who travels the globe working on interesting projects. In recent years, a lot of his attention has been focused on writing robust and scalable web applications, and in 2005 he wrote a book called Core Web Application Programming with PHP and MySQL. He was was previously the main developer of the SWiK open source community site.
Introduction | p. 1 |
I Using PHP1 PHP Crash Course | p. 13 |
Before You Begin: Accessing PHP | p. 14 |
Creating a Sample Application: Bob's Auto Parts | p. 14 |
Creating the Order Form | p. 14 |
Processing the Form | p. 16 |
Embedding PHP in HTML | p. 17 |
PHP Tags | p. 18 |
PHP Statements | p. 19 |
Whitespace | p. 20 |
Comments | p. 20 |
Adding Dynamic Content | p. 21 |
Calling Functions | p. 22 |
Using the date() Function | p. 22 |
Accessing Form Variables | p. 23 |
Short, Medium, and Long Variables | p. 23 |
String Concatenation | p. 26 |
Variables and Literals | p. 27 |
Understanding Identifiers | p. 28 |
Examining Variable Types | p. 29 |
PHP's Data Types | p. 29 |
Type Strength | p. 29 |
Type Casting | p. 30 |
Variable Variables | p. 30 |
Declaring and Using Constants | p. 31 |
Understanding Variable Scope | p. 31 |
Using Operators | p. 32 |
Arithmetic Operators | p. 33 |
String Operators | p. 34 |
Assignment Operators | p. 34 |
Comparison Operators | p. 36 |
Logical Operators | p. 38 |
Bitwise Operators | p. 38 |
Other Operators | p. 39 |
Working Out the Form Totals | p. 41 |
Understanding Precedence and Associativity | p. 42 |
Using Variable Functions | p. 44 |
Testing and Setting Variable Types | p. 44 |
Testing Variable Status | p. 45 |
Reinterpreting Variables | p. 46 |
Making Decisions with Conditionals | p. 46 |
if Statements | p. 46 |
Code Blocks | p. 47 |
else Statements | p. 47 |
elseif Statements | p. 48 |
switch Statements | p. 49 |
Comparing the Different Conditionals | p. 51 |
Repeating Actions Through Iteration | p. 51 |
while Loops | p. 53 |
for and foreach Loops | p. 54 |
do...while Loops | p. 55 |
Breaking Out of a Control Structure or Script | p. 56 |
Employing Alternative Control Structure Syntax | p. 56 |
Using declare | p. 57 |
Next 572 Storing and Retrieving Data | p. 59 |
Saving Data for Later | p. 59 |
Storing and Retrieving Bob's Orders | p. 60 |
Processing Files | p. 61 |
Opening a File | p. 61 |
Choosing File Modes | p. 61 |
Using fopen() to Open a File | p. 62 |
Opening Files Through FTP or HTTP | p. 64 |
Addressing Problems Opening Files | p. 65 |
Writing to a File | p. 67 |
Parameters for fwrite() | p. 68 |
File Formats | p. 68 |
Closing a File | p. 69 |
Reading from a File | p. 71 |
Opening a File for Reading: fopen() | p. 72 |
Knowing When to Stop: feof() | p. 73 |
Reading a Line at a Time: fgets(), fgetss(), andfgetcsv() | p. 73 |
Reading the Whole File: readfile(), fpassthru(), andfile() | p. 74 |
Reading a Character: fgetc() | p. 75 |
Reading an Arbitrary Length: fread() | p. 75 |
Using Other Useful File Functions | p. 76 |
Checking Whether a File Is There: file_exists() | p. 76 |
Determining How Big a File Is: filesize() | p. 76 |
Deleting a File: unlink() | p. 76 |
Navigating Inside a File: rewind(), fseek(), andftell() | p. 76 |
Locking Files | p. 78 |
A Better Way: Database Management Systems | p. 79 |
Problems with Using Flat Files | p. 79 |
How RDBMSs Solve These Problems | p. 80 |
Further Reading | p. 80 |
Next 803 Using Arrays | p. 81 |
What Is an Array? | p. 81 |
Numerically Indexed Arrays | p. 82 |
Initializing Numerically Indexed Arrays | p. 82 |
Accessing Array Contents | p. 83 |
Using Loops to Access the Array | p. 84 |
Arrays with Different Indices | p. 85 |
Initializing an Array | p. 85 |
Accessing the Array Elements | p. 85 |
Using Loops | p. 85 |
Array Operators | p. 87 |
Multidimensional Arrays | p. 88 |
Sorting Arrays | p. 92 |
Using sort() | p. 92 |
Using asort() and ksort() to Sort Arrays | p. 93 |
Sorting in Reverse | p. 93 |
Sorting Multidimensional Arrays | p. 93 |
User-Defined Sorts | p. 93 |
Reverse User Sorts | p. 95 |
Reordering Arrays | p. 96 |
Using shuffle() | p. 96 |
Using array_reverse() | p. 97 |
Loading Arrays from Files | p. 98 |
Performing Other Array Manipulations | p. 102 |
Navigating Within an Array: each(), current(), reset(), end(), next(), pos(), and prev() | p. 102 |
Applying Any Function to Each Element in anArray: array_walk() | p. 103 |
Counting Elements in an | |
Table of Contents provided by Publisher. All Rights Reserved. |
The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.
The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.
Digital License
You are licensing a digital product for a set duration. Durations are set forth in the product description, with "Lifetime" typically meaning five (5) years of online access and permanent download to a supported device. All licenses are non-transferable.
More details can be found here.