更改字符串内容的顺序

I have this data

$s = '{ "date": "2015-07-30","value": 66568 },{ "date": "2015-07-29","value": 66598 },{ "date": "2015-07-28","value": 66680 },{ "date": "2015-07-27","value": 66774 }';

Im graphing the data and basically i need the graph to show the earliest date first, this can be accomplished if i simply flip the data. I tried using:

implode(' ', array_reverse(explode(',', $s)))

and that didnt work.

The data comes from the db and is appended to

if($test!=1) {
    $testString = $testString.',{ "date": "'.date("Y-m-d",strtotime($date)).'","value": '.$res[$row]['followed_by'].' }';  
} else {
    $testString = $testString.'{ "date": "'.date("Y-m-d",strtotime($date)).'","value": '.$res[$row]['followed_by'].' }';  
}

The data is added to the graph with "dataProvider": [ <?php echo $testString; ?> ]

You can try to use this code:

$s = '{ "date": "2015-07-30","value": 66568 },{ "date": "2015-07-29","value": 66598 },{ "date": "2015-07-28","value": 66680 },{ "date": "2015-07-27","value": 66774 }';

function reverse_str($str) {
  $decoded = json_decode(sprintf('[%s]', $str), true);
  $reversed = array_reverse($decoded);
  return trim(json_encode($reversed), '[,]');  
}

Usage:
$newStr = reverse_str($s);