| PHP 101 (part 5) - The Wonderland Factor |
|
|
| Wednesday, 12 September 2007 | |
|
Page 1 of 10
If you've been following along, you already know how PHP can be used to extract data from a database...it's as easy as apple pie. But in the real world, data isn't always stored in neat rows and columns, and you're quite likely to come across situations where the data you need is actually stored in a bunch of ASCII text files. You have three options here. You could con someone into the mind-numbing task of inserting the textual data into a database. You could throw up your hands in despair and look for another job. Or you could use PHP's built-in file functions to extract and format the data. The first option requires guile and cunning. The second is unacceptable. And the third requires this issue of PHP 101. Over the next few pages, we'll be discussing the basics of PHP's file functions, together with some interesting examples. And then we'll explore the murky tunnels of user-defined functions, and delve deep into the mysteries of local and global variables, return values and function parameters. Pack some warm clothes, bring enough food and get someone to feed the dogs - this is one journey you don't want to miss! |
| < Prev | Next > |
|---|

















