I have an PHP\SQL project that I have to build on and am checking out how the data is stored and presented. I am however having problems with an array. I know what arrays are, and that there are numerical and associative arrays. I learnt that two-dimensional arrays are really an array inside an array.
I am having difficulty with what type of array report_data is. Is this only a two directional array? Where the row array is stored at the numerical position of hour in report_data? Or is there an associative array there? I was trying to use print_r($report_data) but it didn't give any output.
$total_p_hour[$hour] = 0;
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
$report_data[$hour][$row['station_name']] = $row['vcount'];
$total_p_hour[$hour] += $row['vcount'];
$station_names[$row['station_name']] = $row['station_name'];
}