"this is first item", "Description"=>"this is first item description", "PicUrl"=>"http://img4.imgtn.bdimg.com/it/u=2943793272,3641314298&"/> "this is first item", "Description"=>"this is first item description", "PicUrl"=>"http://img4.imgtn.bdimg.com/it/u=2943793272,3641314298&">
首页 > 后端开发 > php教程 > xml-微信多图文foreach验证失败,求找茬!头要炸了!

xml-微信多图文foreach验证失败,求找茬!头要炸了!

WBOY
发布: 2016-06-02 11:27:46
原创
943 人浏览过

xmlphp微信

请问这段代码哪里有错?

<code> $newsArr = array(         array("Title"=>"this is first item",            "Description"=>"this is first item description",            "PicUrl"=>"http://img4.imgtn.bdimg.com/it/u=2943793272,3641314298&fm=21&gp=0.jpg",            "Url"=>"http://www.baidu.com"         ),         array("Title"=>"this is second item",             "Description"=>"this is second item description",             "PicUrl"=>"http://img2.imgtn.bdimg.com/it/u=945726929,542696667&fm=21&gp=0.jpg",             "Url"=>"http://www.baidu.com"         ),         array("Title"=>"this is thired",            "Description"=>"this is thired",            "PicUrl"=>"http://img1.imgtn.bdimg.com/it/u=2783016379,35786742&fm=21&gp=0.jpg",            "Url"=>"http://www.baidu.com"         ));foreach ($newsArr as $key => $value) {   $itemstr .= "         <item>         <title></title>         <description></description>         <picurl></picurl>         <url></url>         <item>";}   $result = "<xml>         <tousername></tousername>         <fromusername></fromusername>         <createtime>%s</createtime>         <msgtype></msgtype>         <articlecount>".count($newsArr)."</articlecount>         <articles>".$itemstr."</articles>         </xml>";   $newsInfo = sprintf($result, $fromUser , $toUser , time());   echo $newsInfo;</item></item></code>
登录后复制
相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板