Context: I have a large table that I'm trying to assign to several variables. My columns are named things like "grp" or "scr". There are 48 rows, so to isolate each item, I want to be able to call the variables "grp1" or "scr5" or "grp48".
getdata.php
$m = 1;
while ($m<=48) {
$conn->query("SELECT * matches WHERE mid = '$m'");
while($row = mysqli_fetch_array($result)) {
$grp(1-48) = $row['grp']; // Not sure how to approach this.
}
$m++;
}
Any help is appreciated!