all
Decrease month by one in strtotime in this loop.
$twitter_val7 .='{
date: new Date('.date("Y",strtotime($date)).', '.date("m",strtotime($date)).', '.date("d",strtotime($date)).'),
value: '.$result_twitter->counts.'
},';
To decrease by 1 month using
strtotime()you literally tell it to decrease by one month:Assuming, of course, that
$dateis a formatstrtotime()understands.