I have a parent array that contains
years as
1994,
1995,
1996,
1997,
1998,
1999,
2000,
2005
and on the other hand i am getting result from my db that returns year and count , Now, what i am trying to do is that an array being populated as per parent array (years) for the results being generated for something like following:
Results being Generated by sql +----------------+ YEAR | Count 1994 | 16 1995 | 16 1996 | 16 +----------------+
The array should store following values as per check if sql query results contains result for year of parent array or not
1994 | 16 1995 | 16 1996 | 16 1997 | 0 1998 | 0 1999 | 0 2000 | 0 2005 | 0
Thanks, Note I want the reuslt to be generated in an array as mentioned above because i have to pass these values to highcharts (For generating graph)