|
Posted by Nick Wedd on 01/25/07 13:13
This code
$cn = $ct[$k];
print "<a name='$ct[$k]'>$continentname[$cn]</a>\n";
works, and prints something like <a name='af'>Africa</a>
But if I try to simplify it, to
print "<a name='$ct[$k]'>$continentname[$ct[$k]]</a>\n";
I get a syntax error
unexpected '[', expecting ']'
So what is the correct way to write something like $a[$b[$c]] ? I have
tried adding extra {} and '' here and there, so far without success.
Nick
--
Nick Wedd nick@maproom.co.uk
Navigation:
[Reply to this message]
|