×
Home About Us Products Services News Free Scripts Contact
news php scripts and software

PHP example - How to pass an argument to a function by reference in PHP?


PHP - How to pass an argument to a function by reference in PHP?

<?php
function SomeFunction(& $SomeArgument)
{
	$SomeArgument=$SomeArgument+5;
}

$TestVar=10;
SomeFunction($TestVar);

echo $TestVar; // will print 15 !!

?>

Category: PHP

 
<< Go back