I have a function like this:
function searchSingleUrlGraph($mysql){
$query="SELECT * FROM `dailydata` WHERE `userid`='".$_SESSION['userdata']['userid']."' AND `url`='faboolis.com'";
$HTML='[';
$result=$mysql->query($query);
while($row=$result->fetch_assoc()){
$HTML .= "[
['".$row['date']."',".$row['fblikes']."],
['".$row['date']."',".$row['fbshares']."],
],";
}
$HTML .=']';
return $HTML;
}
the result I want is this:
[[['Jun 4',224],['Jun 5',34],],[['Jun 4',220],['Jun 5',30],],];
but right now Im getting:
[[['Jun 4',224],['Jun 4',34],],[['Jun 5',220],['Jun 5',30],],];
I know there is an easy solution I'm just brain dead right now and its driving me crazy.
Jun 4, 224 fblikes
/Jun 4, 224 fblikes
andJun 5, 34 fbshares
/Jun 5, 30 fbshares
. That doesn't make sense.