Function return more than one value : Return Value : Functions PHP Source Code


PHP Source Code » Functions » Return Value »

 

Function return more than one value



<?php
   function retrieve_user_profile() {
      $user[] "A";
      $user[] "A@example.com";
      $user[] "English";
      return $user;
   }
   list($name,$email,$language= retrieve_user_profile();
   echo "Name: $name, email: $email, preferred language: $language";
?>


           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo Functions
» Return Value