【发布时间】:2017-02-07 23:25:58
【问题描述】:
我想以自定义顺序显示数组数据。
我的示例数组是:
['a' => 'a',
'b' => 'b',
'c' => 'c',
'd' => 'd',
'e' => 'e',
'f' => 'f',]
我已尝试使用以下代码:
<table>
<tr>
<?php
$count = 0;
foreach ($support_others as $other) {
echo "<td>" . $other ."</td>";
$count++;
if ((($count % 3) == 0) && ($count > 0)) {
echo ("</tr><tr>");
}
}
?>
</tr>
</table>
其显示顺序为
a b c
d e f
但我想显示为:
一丁点
b e
c f
任何帮助将不胜感激。
【问题讨论】: