Forum Moderators: coopster
if($example['foo'] == "bar") { ... }
or in any other control statement; if, for, while,,,
At the moment I have to;
Sfoo = $example['foo'];
if($foo == "bar") { ... }
is there a way to condence it down to the one line? Also if you try to use the same array syntax in a heredoc it will not work; reason? fix?
Out of interest on anyone viewing this thread asking the same; I find it strange that this (from php docs):
$string = "Blah blah {$example['foo']}";
will work, but not in heredoc or in if, while,,,