O'Reilly logo

PHP and MySQL by Example by Marko Gargenta, Ellie Quigley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9User-Defined Functions

Image

9.1 What Is a Function?

We have already seen a number of PHP built-in functions to manipulate arrays and strings, perform tests on variables, display output, and more. PHP provides you with a large array of built-in functions to perform common tasks to save you the trouble of writing your own functions. As your programs become more sophisticated, you might find that the particular task you need is not handled by PHP or that you want to break your program into smaller units to make it more manageable. Then it is time to write your own functions, and this chapter will show you how. But first ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required