name (argument).
The name being the name of the function, and the argument being the value (s) it is using.
A function is like a subroutine. It is a predefined set of commands that are executed when the function is called. Functions can be as simple or complex as desired, and can contain other functions within themselves. In the case of PHP, some functions come preprogrammed and others you can define on your own.
function function_name ( [ argument_list....] )
{
[statements]
[return return_value;]
}
<html>
<head>
<title>Creating a PHP Function</title>
</head>
<body>
<h1>Creating a PHP Function</h1>
<?php
echo "Hello sir <br>";
echo "This is a very useful website for r4r.co.in <br>";
display();
function display()
{
echo "Best educational site this site name is r4r.co.in";
}
?>
</body>
</html>
Output:
Others
Languages
Frameworks
Web / Design
Mobile Technology
Sql & Technology
R4R