How i can output my array without quotes on this situation
for($i=1; $i <= date("d"); $i++) { $days[] = $i; }
echo json_encode($days); // ouput [1,2,3,4,5,6,7,8,9,10]
This first on is fine, but on the second one
for($i=1;$i <= date("d"); $i++) {
$Sql = "SELECT COUNT(Stats_Clicks) AS Total FROM tabstats WHERE DAY(Stats_Date) = $i
AND MONTH(Stats_Date) = $month
AND YEAR(Stats_Date) = $year
";
$Query = mysql_query($Sql,$Conn) or die (mysql_error($Conn));
$Rs = mysql_fetch_array($Query);
$clicks[] = $Rs['Total'];
}
echo json_encode($clicks);
json output returns this
["1","1","0","0","0","0","0","0","0","0","0"]
i need this without quotes on this format.
You just need cast to integer.