[Home]

PHP File Links

Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9 Chapter 10 Chapter 11 Chapter 12 Chapter 13 Chapter 15 Core Web Programming

Lincoln CA May 2006

Chapter 05

if else structure 62 (ifelse.php)
else if structure 62 (if_elseif.php)
switch 64 (switchTest.php)
while loop 66 (while.php)
do while loop 67 (doWhile.php)
for loop 68 (for.php)
for loop division 68 (forLoopDiv68.php)
break statement 69 (forLoopBreak69.php)
continue statement 70 (continue.php)
Nested Loops 71 (nest2Loops.php)
Nested Loops with Color Rows Alternationg 71 (nest2LoopsColor.php)
Multiple print statements in a code block 72 (codeBlock.php)
HTML enclosed in a PHP code block 73 (codeBlock2.php)

Chapter 06

abs() Function 79 (absFunc.php)
Declare Function with Arguments 80-81 (declareFuncWithArgs.php)
Function that returns a value 82 (FuncReturnValue.php)
Calling a Function Dynamically 83 (DynamicFuncCall.php)
Testing Variable Scope 84 (VariableScope.php)
External Vars Inaccessible Within Function 85 (VarScopeOutsideFunc.php)
Access Global Vars with global statement 86 (AccessGlobalVars.php)
Function that remembers a value (using Global) 87 (rememberValue.php)
Function remembers a value (using Static) 89 (rememberValueStatic.php)
Testing for Function Existence 94 (funcExists.php)

Chapter 07

With foreach, looping through associative array (foreach.php)
array_merge() (array_merge.php)
array_push() (array_push.php)
array_shift (array_shift.php)
array_slice (array_slice.php)
Looping a Multidimensional array (multiArray.php)
Sorting an associative array by value with asort() (asort.php)
Sorting an associative array by key with ksort() (ksort.php)
func_get_args (getArgs.php)

Chapter 08

Creating an Object (120createObj.php)
Object Properties (121objectProps.php)
Object Methods (122objectMethods.php)
Using THIS in a class (123objectThis.php)
Object Constructor (124objConstructor.php)
Class Table (128classTable.php)
Class Inheritance (130classInherit.php)
Override Parent Class Method (131overrideParentMethod.php)
Override Parent Class Method (132callOverrideParentMethod.php)
HTML Table (135HTMLTable.php)
Test Class and Inheritance of Object (140testObjClassInheritance.php)
Store/Retrieve Objects (141serialize.php)
Store/Retrieve Objects: serialize and sleep (142serializeSleep.php)

Chapter 09

Looping through $GLOBALS Array (150predefinedVariables.php)
Simple HTML Form (152listing9_2.html)
Simple HTML Form with SELECT (153listing9_4.html)
Extracting GET or POST request Parameters (listing9_7.html)
Number Guessing Script (158guess.php)
Number Guessing Script _ Save State with Hidden Field (160guess2.php)
Number Guessing Script _ Send to remote page to congratulate (162guessCongrats.php)
File Upload (165fileUpload.php)
File Upload B (165fileUpload_B.php)
File Upload (uploadForm.html)

Chapter 10

Including a plain Text file with include() (170_include.php)
Including external file containing PHP statements with include() (170b_include.php)
Including external files within a loop (Listing10_7.php 172)
is_writable, is_executable, is_readable (174_checkFileStatus.php)
File info with fileatime, filemtime, filectime (175_fileDateInfo.php)
Multiple File Tests Function (176_multipleFileTestFunc.php)
Create file with touch() (177_touchCreateFile.php)
Read a File Line By Line with fgets() (179_fgets.php)
fread (180_fread.php)
fseek (181_fseek.php)
fgetc (182_fgetc.php)
fwrite (183_fwrite.php)
readdir (185_readdir.php)

Chapter 11 SAMS 24 Hour PHP

DBM (add2DBM.php)
DBM handlers (handlers.php)
DBM dbm_open() (dbmopen.php)

Chapter 12 SAMS 24 Hour PHP

Open and select a database (210openSelectDB.php)
Add Row to Database (212addRow.php)
Add User to a database (213addUser2.php)
Add User Input to a database using a Form (addUserInput.php)
Extract Data from a database using a Form (extractUserInput.php)
Add User Story to a database using a Form (addUserStory.php)
Extract User Story from a database using a Form (extractUserStory.php)
Print out entire Database (listAllRowsFields.php)
Print out entire Database (listAllRowsFields2.php)

Chapter 13 SAMS 24 Hour PHP

Call serverVars.php (callServerVars.html)
Server Variables (serverVars.php)
Open Web Page with fopen() (242_openWebPage.php)
Using gethostbyaddr() to get a Hostname (243_getHostByAddress.php)
Making a Network Connection using fsockopen() (245_networkConnection.php)

Chapter 14 SAMS 24 Hour PHP

Images on the Fly

Dynamic Image Creation (256_createImg.php)

Chapter 15 SAMS 24 Hour PHP

Working with Dates and Times

Acquiring Date Information with getdate() (279_getdate.php)
Format Date with date() (281_formatDate.php)
Create a Timestamp with mktime() (282_mktime.php)
Dynamic Calendar (286_calendarForm.php)

Core Web Programming - PHP

Open and then Close a directory (closedir.php)
fgets() (fgets.php)
file() (file.php)
Who's on First (getCurrentUser.php)
Last File Modification Time (getLastMod.php)
Last Login() (lastLogClass.php)

Opening a Directory with opendir()() (opendir.php)
PHP Info (phpinfo.php)
Recursion (recursion.php)
Rewinding a Directory (rewinddir.php)
stat() function (stat.php)
Translating an Array (translateArray.php)
while loop (whileTest.php)
Writing out a Table (writeTable.php)