如何在 PHP 中实现 DataList (asp.net) 类功能?
我想在两列中显示数据,如下所示
Entry 1 Entry 2
entry 1 description entry 2 description
Entry 3 Entry 4
entry 3 description entry 4 description
Entry 5
entry 5 description
现在在asp.net中它非常简单,只需获取一个数据列表进行一些设置并为其提供数据源,它就会为您呈现它。
但是在 PHP 中如何显示这种列表,任何人都可以给我一些代码吗?
谢谢
I want to display data in two columns as below
Entry 1 Entry 2
entry 1 description entry 2 description
Entry 3 Entry 4
entry 3 description entry 4 description
Entry 5
entry 5 description
Now In asp.net its prestty easy, just get a datalist make some settings and give data source to it and it will render it for you.
But in PHP how to display this kind of list, can anyone give me some code for this?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我假设你想绘制一个 html 表格..
这很容易处理 html 布局和 可变列号。
这是一个示例代码,可以完全满足您的需要。
i assume that you want draw an html table..
which is so easy to handle html layout & variable column number.
here is a sample code that will do exact what you need..
我想您是在问如何构建 HTML 输出?
您可以使用 CSS 轻松设置其样式,使它们浮动以形成列或您拥有的东西。
如果您使用框架,它可能包含某种帮助程序来执行此操作,但标准 PHP 不会。
这是否回答你的问题?
I suppose you're asking how to build the HTML output?
You can easily style this using CSS, floating them to make columns or what have you.
If you're using a framework it may include a helper of some sort to do this, but standard PHP does not.
Does that answer your question?