I have a script very similar to this, that prints out all of the elements of an array:
$sql['name_1']="content";
$sql['name_2']="content";
$sql['name_3']="content";
for ($i=0;$i<=count($sql);$i++) {
$result = mysql_query($sql[$i]);
print "<pre>".$sql[$i]."</pre>"; // debug
}
The problem I am having is that the script works fine when I number the elements instead of naming them, like so:
$sql[0]="foo";
But, I see no reason why if you name an element that it wouldn't have a number assigned to it anyway.