Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

How do you define function in php and can you call function in other file?

user-image
Question added by Fahmi Aijaz Aijaz , Tata classedge coordinator , 2 coms consulting
Date Posted: 2017/03/20
Suresh Ramachandran
by Suresh Ramachandran , Application Administrator , Healthcare Solutions

ff1.php

<?php

  function call1($int, $string){ //function parameters, two variables.

    return $string;  //returns the second argument passed into the function

  }

?>

 

ff2.php

<?php

  include 'File1.php';

  echo first(1,"Call"); //returns omg lol;

?>

 

More Questions Like This