안녕하세요, 저는 PHP에 익숙하지 않고 탐색하려고합니다! 내 코드에 내 변수를 삽입하는 데 문제가 있습니다. 메신저 내 변수를 넣어 tyring 곳정수 대신 변수를 할당하는 방법
$(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',
을 여기 정확히 : 넣어하려고 메신저 곳을 Heres 내 변수 여기
$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';");
그리고이다. Cant는 이것을 알아 낸다.
data: [$jul,$aug]
}]
});
});
결과 개체를 가져와야합니다. PHP 블록을 입력하여 출력하지 않는 한'$ jul'은 PHP가 아닙니다. php echo $ jul; ?>'. – chris85