【发布时间】:2011-08-17 03:01:32
【问题描述】:
在 php 中我从 pgsql 得到一个数组:
$res = $db
->query( "SELECT myarray FROM arrays WHERE array_name=smth" )
->fetchRow();
exit (json_encode($res));
pgsql 中的类型是整数[]
但在 JS 中,我得到带有一个字符串 "{1,2,3,...,}" 的 JSON 如何以“数组方式”获取这些数据?
【问题讨论】:
标签: php arrays json postgresql