JSON格式获取的html表为什么不显示?

已经好几天了,我还没解决这个问题......我已经完成的工作是:编写了一个php脚本,它与我的JSON数据结构相呼应。现在,我正在尝试编写一个HTML脚本,它将以JSON格式获得结果,但在html表中对此进行回显。我对我的html页面进行了编码,但是由于某种原因,该表没有出现。

我的json_encode($res->getchAll())echo看起来是这样的:

[{"name":"Victoria 

Use data tables . It is very powerful and easy to use java script api. It provides a lot of features as well like sorting searching etc.

You only have to change the format of JSON and rest all will be taken care by datatables.

An example

Your out is not valid json, the echo "{$res->numRows()}<br/>"; invalidates it and needs to be removed.