Passing Variables as a Reference to the Argument of a Function : Parameters : Functions PHP Source Code


PHP Source Code » Functions » Parameters »

 

Passing Variables as a Reference to the Argument of a Function



<?php
  function somefunct ($somearg){
    $somearg += 3;
  }
  $othernum = 12;
  somefunct ($othernum);
  echo "$othernum","n";
  
  somefunct (&$othernum);
  echo "$othernum","n";  
?>

           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo Functions
» Parameters