I am trying to do something that should be trivial. I have a database table that I want to load into an array so that I can use the elements later on in my code. What I dont understand is how to put the elements into a simple 2 dimensional array so that I can get elements to the elements lik $tbl[$r][$c]
So basically I would like to do something like:
$tbl=array();
$rowno='0';
while ($row = mysql_fetch_assoc($result))
{
$Type=$row['Type'];
$Category=$row['Category'];
$SubCategory=$row['SubCategory'];
$InflationRate=$row['InflationRate'];
$tbl[$rowno][0]=$rowno;
$tbl[$rowno][1]=$Category;
$tbl[$rowno][2]=$SubCategory;
$tbl[$rowno][3]=$InflationRate;
$tbl[$rowno][4]=0;
$rowno++;
}