Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php get function from different file

<?php
    function first($int, $string){ //function parameters, two variables.
    	return $string;  //returns the second argument passed into the function
  	}
?>
  
<?php
    include 'File1.php';
    echo first(1,"omg lol"); //returns omg lol;
?>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #function #file
ADD COMMENT
Topic
Name
5+1 =