1.

How To Define A User Function?

Answer»

You can DEFINE a user function ANYWHERE in a PHP SCRIPT using the function statement like this: "function name() {...}". Here is a PHP script EXAMPLE on how to define a user function:
<?php
function msg() {
print("Hello world!\n");
}
msg();
?>
This script will print:
Hello world!

You can define a user function anywhere in a PHP script using the function statement like this: "function name() {...}". Here is a PHP script example on how to define a user function:
<?php
function msg() {
print("Hello world!\n");
}
msg();
?>
This script will print:
Hello world!



Discussion

No Comment Found