Hi im new to php and trying to explore! Im having a problem inserting my variable to my code. Heres my variables
$jun = mysql_query("SELECT count(*) from tbl_users where MonthCreated = 'June' and YearCreated = '2016';");
$jul = mysql_query("SELECT count(*) from tbl_users where MonthCreated = 'July' and YearCreated = '2016';");
$aug = mysql_query("SELECT count(*) from tbl_users where MonthCreated = 'August' and YearCreated = '2016';");
$sep = mysql_query("SELECT count(*) from tbl_users where MonthCreated = 'September' and YearCreated = '2016';");
$oct = mysql_query("SELECT count(*) from tbl_users where MonthCreated = 'October' and YearCreated = '2016';");
$nov = mysql_query("SELECT count(*) from tbl_users where MonthCreated = 'November' and YearCreated = '2016';");
$dec = mysql_query("SELECT count(*) from tbl_users where MonthCreated = 'December' and YearCreated = '2016';");
And here is where im trying to put it:
$(function () {
$('#container').highcharts({
title: {
text: 'Monthly Average Requests',
x: -20 //center
},
subtitle: {
text: 'Source: Barangay Harapin ang Bukas',
x: -20
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
yAxis: {
title: {
text: 'Volume'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
valueSuffix: '' //suffix *C
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'middle',
borderWidth: 0
},
series: [{
name: 'Complaints',
data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9,20]
}, {
name: 'Services',
data: [-0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5]
}, {
name: 'Registered Constituents',
Here exactly is where im tyring to put my variables. Cant figure this out.
data: [$jul,$aug]
}]
});
});