I've been PHPin for quite some time now, but I never could find what the difference was between:
$var = "hello";
and
"hello" => $var // I think that's how I've seen it
What's the diff? thanks ; )
Quick Question
Moderator: General Moderators
Re: Quick Question
The first is just vanilla assignment of something to a variable.
The second is only for associative arrays (the key isn't just an automatically-incremented number).
The second is only for associative arrays (the key isn't just an automatically-incremented number).