[Tutor] Why not to use include?

W W srilyk at gmail.com
Mon Jun 9 18:15:13 CEST 2008


> Thanks, Wayne, I am actually aware of this method. But it seems that
> what I really want _is_ a function, and not a simple include.

When you say function, exactly what are you referring to? Because
really all a function *is* is a set of statements that

takes input*
does something*
gives output*

*optional

For instance, in PHP, include('header.php') is a function that works
similar to the few lines of code I wrote earlier.

the input to the include function is the filename, the process or
"does something" is it opens the file, and the output is returning it
into the php file.

-Wayne


More information about the Tutor mailing list