"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&">
Rumah > pembangunan bahagian belakang > tutorial php > xml-微信多图文foreach验证失败,求找茬!头要炸了!

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

WBOY
Lepaskan: 2016-06-02 11:27:46
asal
939 orang telah melayarinya

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>
Salin selepas log masuk
Label berkaitan:
sumber:php.cn
Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan