【发布时间】:2016-06-17 11:21:30
【问题描述】:
给定一个数组,有没有办法输出一个 4 列的 html 表,其中包含按字母顺序排列的数组内容列表,突出显示字母表的第一个索引字母(仅当数组中的元素以任何给定的字母)?
换句话说,假设我有数组:
$array = ('apple','pear','banana','pomegranate','orange','peach','clementine');
我想要这样的输出:
_________________________________________
|A |C |P |O |
|apple |clementine |pear |orange |
|B |O |pomegranate | |
|banana |orange |peach | |
------------------------------------------
我该怎么做?
【问题讨论】: