Hey gang, in this PHP tutorial I’ll teach you about variable scope in PHP. —————————————- Course Links: + Course files …
Original source
Hey gang, in this PHP tutorial I’ll teach you about variable scope in PHP. —————————————- Course Links: + Course files …
Original source
5 responses to “PHP Tutorial (& MySQL) #14 – Variable Scope”
You are a Ninja. Nice explanation, thanks.
Very nice Tutorial Shaun, Thank you so much Shaun! 🙂
instead of passing by reference can you have the method return the value and set it to name?
So:
$name = 'mario'
$name = sayBye($name);
function sayBye($name)
{
echo 'bye wario';
return 'wario';
}
echo $name; // would this print out wario?
Thanks, shaun…i am new to PHP but having fun already with it. please kindly do Laravel tutorial too after this..please ninja come to our rescue. cheers!
delicious.. PHP is my first lang and i am using it for almost 2 years but never got the hang of this "by reference parameter" thing you have shown at 7:59. Now finally i can gratefully say that God had sent a ninja to rescue me from this phenomena