php by refrence code example
Example: php pass by reference
<?php
function appendToString(&$string)
{
$string .= 'Cool Im appended';
}
$str = 'I am a start and - ';
appendToString($str);
echo $str; // outputs 'I am a start and - Cool Im appended'
?>