如题,使用php解析json数据,使用下面代码出错:
<?php
header('Content-Type: text/html; charset=UTF-8');
$json_string= [{"text":"test","created":"Sun Nov 08 01:07:10 +0000 2015","favorite_count":0,"retweet_count":0,"url":"","media_url":""}];
$obj=json_decode($json_string);
echo $obj->text;
?>