Home  >  Article  >  Backend Development  >  小弟我在用php做一个json字段的输出的时候,需要输出两个json数据,但是前台获取不到

小弟我在用php做一个json字段的输出的时候,需要输出两个json数据,但是前台获取不到

WBOY
WBOYOriginal
2016-06-13 10:19:22951browse

我在用php做一个json字段的输出的时候,需要输出两个json数据,但是前台获取不到
我的代码如下,请高手帮忙指点一下!!
$qunList=$songGuoEr->findCountTestQuesMainListByTestId($testId,$offset,1);
$optionsList=$songGuoEr->findCountTestQuesOptionsListByQuesId($qunList->quesId);
echo json_encode($qunList);
echo json_encode($optionsList);
谢谢!!

------解决方案--------------------
echo json_encode( array($qunList, $optionsList) );

当然你的前台也要做相应的变动

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn