700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > php json数组有关问题

php json数组有关问题

时间:2022-11-27 18:44:39

相关推荐

php json数组有关问题

后端开发|php教程

nbsp,result,array,image,json

后端开发-php教程

php json数组问题

php json数组问题,$result1和$result2两个数组合并成一个,单独输出 echo json_encode($result1); echo json_encode($result2);

最后输出效果:

{

“id”:”111”,

“image_name”:”我的卧室“,

“image_url”:“d:/image/a.jpg”,

蚂蚁信息分类源码下载 5.8,怎样编译vscode 源码,ubuntu添加键盘,tomcat猫胺好吗,headlessjava爬虫,php输出到浏览器,网址导航站怎么seo,带附近商家网站源码,app下载页面源码模板lzw

comments:[{

“uid”,“122”,

“cname“:”小明“,

“ctime”,“-12-12”,

}]

}

做出这种效果, echo json_encode( array($result1, $result2) );这样输出的不对,是直接在后面加上了,而没有成单独的数组

网站生成小程序源码,怎么扩大ubuntu内存,为什么tomcat如此优秀,混淆字体 爬虫,网页制作成品php,免费seo营销软件seo黑帽lzw

该怎么做呢

——解决思路———————-

你的 $result1、$result2 都是什么?

——解决思路———————-

缩略图切换源码,ubuntu查看系统报错,爬虫尾巴像蝎子,php软件dll,seo所有秘密lzw

$result1 = array(

id => 111,

image_name => 我的卧室,

image_url => d:/image/a.jpg

);

$result2 = array(

comments => array(

array(

uid => 122,

cname => 小明,

ctime => -12-12

)

)

);

$result = array_merge($result1, $result2);

echo json_encode($result);

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。