Without specifically doing so,
Like:
function init($var){
  $var = 'x';
}
function a(){
  init($foo);
  echo $foo; // should be x
}
Something like the list() function :)
Pass by reference:
function init(&$var){
  $var = 'x';
}
                        Sure. You can pass the parameter by reference. So you have to change this
function init($var)
into this:
function init(&$var)
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With