Retrieve it all in one query and use a seperator in between every bit of data. You set that in the php script. As an example i will use "|" as a seperator.
The line in php would look something like this:
echo $row["index1"] . "|" . $row["name1"] . "|" . $row["index2"] . "|" . $row["name2"] . "|" ;
Then in Construct2 you use: system > set variable > (tokencount(AJAX.LastData, "|")
This will count the pieces of data seperated of by the "|"
Then just set the size of the array with that variable.