Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

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

user-image
Question ajoutée par Fahmi Aijaz Aijaz , Tata classedge coordinator , 2 coms consulting
Date de publication: 2017/03/20
Suresh Ramachandran
par 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

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?