Want to write your own PHP functions, but don’t want a 1,000-page tome? Peachpit’s new Short Cuts! Quick PDF guides that are...Smart...Handy...Concise.
This mini guide covers exactly what you need to know about writing your own functions to perform specific tasks and save you programming time. Functions are a strong step in creating Web applications and building a solid library of PHP code to use in future projects. Why create functions? As you program, you’ll discover that you use certain sections of code frequently, either within a single script or over the course of several scripts. Placing these routines into a self-defined function can save you time and make your programming easier, especially as your Web sites become more complex. You’ll learn:
• How to write your own functions
• Pass information to the function
• Use default values in a function
• Have your function return a value
• How functions and variables work together
• And more!