(assume emailarray[0]=hello This works;
<? echo($emailarray[0]); ?>
output = hello if $a = 0, why doesnt this work
<? echo($emailarray[$a]); ?>
output = parser error
can variables be used inside arrays like this?
This works:
$emailarray = array("hello"); echo($emailarray[0]); $a = 0; echo($emailarray[$a]);
Post your whole code - the error is somewhere else.
Your absolutely right, the error was somewhere else. Thanks