绑定xml数据以下拉选择类型列表 [英] binding xml data to drop down list of select type
本文介绍了绑定xml数据以下拉选择类型列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有php文件,从中我以xml的形式获取数据,我有.ascx页面,其中我使用select语句作为下拉列表。如何将数据绑定到select标签的下拉列表?
提前谢谢
I am having php file, from which i am getting data in the form of xml, i am having .ascx page in which i have used select statement to use as drop down list. how to bind the data to that drop downlist of select tag ?
thank you in advance
推荐答案
使用
use
kis = simplexml_load_file(http://www.example.com/kis.xml);然后我会使用
kis=simplexml_load_file("http://www.example.com/kis.xml"); then foreach the data which you want to show in select tab example in books in xml then i will use
kis-> books in
然后预测您要在选择标签中显示的数据
示例在xml
中的书籍中foreach数据
kis->books in foreach data
这篇关于绑定xml数据以下拉选择类型列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文