【发布时间】:2019-07-05 17:16:45
【问题描述】:
我有这样的数组
Array
(
[title] => Array
(
[0] => title1
[1] => title2
[2] => title3
)
[icon-class] => Array
(
[0] => class1
[1] => class2
[2] => class3
)
[text] => Array
(
[0] => text1
[1] => text2
[2] => text3
)
[link-text] => Array
(
[0] => link-text1
[1] => link-text2
[2] => link-text3
)
[link] => Array
(
[0] => link-text1
[1] => link-text2
[2] => link-text3
)
)
我需要这样打印
<ul>
<li>
<h3 class="class1">title1</h3>
<p>text1</p>
<a href="link">1</a>
</li>
</ul>
当我使用 for each 来回显它在行中打印的内容时,它首先回显标题然后链接然后类.. 我需要一个 for each 循环来生成这个 html 上面的html如何生成
【问题讨论】:
-
打印怎么样?
-
为什么你的数据源是这样分组的?这对我来说毫无意义。
-
它由 JOOMLA REPEATBALE FIELD 制作
-
@user3231168 你的输出看起来不完整。数组中的其他值呢?