May 2003
Intermediate to advanced
592 pages
14h 28m
English
As you’ve already seen, PHP has a lot of built-in functions for almost every need. More importantly, though, it has the capability for you to define and use your own functions for whatever specific purpose. The syntax for making your own function is
function function_name () {
// Function code.
}
The name of your function can be any combination of letters, numbers, and the underscore, but it must begin with either a letter or the underscore. In PHP, as I mentioned in the first chapter, function names are case-insensitive (unlike variable names) so you could call that function using function_name() or FUNCTION_NAME() or function_Name(), etc.
The code within the function can do nearly anything, from generating ...
Read now
Unlock full access