I need to fill a multidimensional array and here is my code I have so far for it.
while($num > $i)
{
$default[$i]=0;
$defaultcounter=0;
$default2[$i]=0;
$default3[$i]=0;
$query="Select * from `issues` WHERE `app`='" . $applist[$i] . "'" . "AND `startmonth`='". $month ."' ORDER BY `id` ASC";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
$downtime[$i]+=$row['duration'];
$default2[$i]++; //Number of Incidents Variable
$defaultcouinter++;
$times[$i] = array();
$times[$i][$defaultcounter[$i]]=$row['startday'].$row['starttime'];
}
$appavail[$i]=100 -(ceil($downtime[$i] * 100 / $totaltime));
$default[$i] = (ceil($downtime[$i] / $defaultcounter));
$i++;
}
Apparently I am not doing the array assignment correct. I need to to have my number of rows counted with the $i
variable outside of my while then inside the while the defaultcounter will be keeping up with the column. I tried just doing a $time[$i][defaultcounter]
and it didn't like it. Whats the proper syntax for assigning a multidimensional array?
Thanks