E Online Support - Free Software Download
In php is it possible to define own function?
How to define own function in php?
Shruti
Answer
1

Functions wouldn't be nearly as useful if they weren't able to take in some input. This is where parameters or arguments come in. These are the variables or inputs that a function uses to perform calculations.
<html>
	<head>
		<title></title>
	</head>
	<body>
      <p>
         <?php
        function greetings($name){
        echo "Greeting," . $name . "!";}
        $n="Shruti";
        greetings($n);
        ?>
        
      </p>
    </body>
</html>
Question*:
Description*:
Script:
Related To:
 PHP    HTML    CSS    JAVASCRIPT    JQUERY   
 AJAX    WINDOWS    GAMES    DRIVERS    MAC   
 LINUX    MOBILE    GADGETS   
Security Code:
7834
Enter Security Code:
 
Facebook   Linkedin   Skype   Twitter