Defining a User Function in PHP


How To Define a User Function? in PHP?



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:

function msg() {
  print("Hello world!\n");

This script will print:

Hello world!


Creating Your Own Functions in PHP

⇒⇒PHP Tutorials

2016-12-28, 313👍, 0💬