如何重新格式化以下代码中的输出显示
$columns =2;//No of column
$dataToDisplay = array('green', 'blue', 'white', 'apple', 'computers', 'php');
echo "<table width='100%'>";
$columnwidth = 100/$columns;
$count = count($dataToDisplay);
$i =0;
foreach($dataToDisplay as $data) {
if($i % $columns == 0){
echo "<tr>";
}
echo "<td>" . $data . "</td>";
if(($i % $columns) == ($columns - 1) || ($i + 1) == $num_rows){
echo "</tr>";
}
$i++;
}
echo "</table>";
green | blue white | apple computers | php
但是如何将上面的代码段转换为下面的示例输出
green | STATIC SIGNUP FORM WILL COME HERE blue | white apple| computers php
DIV代替表输出格式