PHP

Topic: Functions

How To Define a User Function?

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!

Browse random answers: