Can anyone please explain the following?
Why when creating a function you would add the $val. For example
<? my_function($val) { }?>
and then when you call a function you would add $val for example
<? my_function($val);?>
That will allow you to pass values to the function. The value of $var will be passed to the function, allowing you to modify it, and then return the new values, with [font=monospace]return $val;[/font]