+ 1

Variable Variable

Hi all, I don't understand this especial in this example <?php $a = 'hello'; $hello = "Hi!"; echo $a; // Outputs 'Hi!' ?>

18th Feb 2018, 8:12 AM
Suweyd Ramadhan
Suweyd Ramadhan - avatar
1 Resposta
+ 8
Since $a is "hello", then $a can be thought of as: $($a) - - > $(hello) - - > $hello Since $hello is "Hi!", then so is $a.
18th Feb 2018, 8:21 AM
David Carroll
David Carroll - avatar