i am getting months and values from a db i have.
month, value
1,1
2,3
3,1
4,5
5,3
6,3
7,3
9,2
problem is, i need the output to look like..
1,1
2,3
3,1
4,5
5,3
6,3
7,3
8,0
9,2
10,0
11,0
12,0
in THAT order! Here is the code I was trying to use, but it prints it out wrong
for ($count = 1; $count < 14; ++$count)
{
$row = mysql_fetch_row($rResult);
//
if ($count == $row[1])
{
$newvalue = $row[3];
}
else
{
$newvalue = 0;
}
with this code, if i echo the contents, it echos out like this
1 1
2 3
3 1
4 5
5 3
6 3
7 3
8 0
9 0
10 0
11 0
12 0
13 0
(i use 13 for undocumented)