October 2006
Intermediate to advanced
720 pages
17h 56m
English
Chapter 6 shows you how to pass a customized sort function into a predefined sorting function. The ability to do so, in your own library functions, is a powerful tool. This section will demonstrate how you pass a function name to make a dynamic function call.
The mechanism to make dynamic function calls is tied to how variables are managed in PHP. You can define a function in your page, or library, and then pass the name of the function as a string and its parameters as a list to another function. Inside the function, you append parentheses containing the actual parameter list to the variable that contains the function name. This statement makes a dynamic function call to the function represented by the string ...
Read now
Unlock full access