Is it possible to call functions within for loops? I have a number of databases that are exactly the same, I would like to use a for loop to set up the connections one at a time (35 databases). I am having trouble with getting php to declare a function with a variable in the name.
for ($i = 1; $i <= 35; $i++)
{
$j=$i+2;
echo "<br><br>DB $i";
$connection$j = prodDB$i();
$getFromDB = "select URL, count(id) as counts from ProductList GROUP BY URL";
$NamesReturned = mysqli_query($connection$j,$getFromDB) or die("Can't execute query GFNFDB.<br><br>$getFromDB<br><br>");
while ($ret=mysqli_fetch_array($NamesReturned))
{
$DB$icounts=$ret["counts"];
$URL=$ret["URL"];
echo "<br>$DB$icounts -- $URL";
}
echo "<br>$DB$icounts";
}