JSON解析
echo json_encode($teacher_info);
json.stringify()
<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/1.6.4/jquery.js"></script>
<script >
$(function(){
$('#btn').click(function(){
$.ajax({
type: "POST",
url: "http://www.zgonline.com.cn/mobile/index.php?act=goods_class&op=get_child_all&gc_id=1237",
success: function(data){
var bc_obj = eval('(' + data + ')');
$.each(bc_obj.datas.class_list,function(name,value) {
$("#temp").append(name+'-'+value.gc_id+'-'+value.gc_name+'<br/>');
});
}
});
});
});
</script>
<input type="button" id="btn" value="btn" />
<div id="temp"></div>