Question
How to make two column list from array?
Hi All,
I want to display an unordered list, generated by an array, in two
columns. How can this be done?
> <ul>
> <?php
> // take text field and create array using explode
> $farray = explode(', ', $row_fieldArray['features']);
> // loop through the array to process each line
> foreach ($farray as $value) {
> // output each line as a <li> element
> echo "<li> $value </li>"; }
> ?>
> </ul>
I thought of enclosing the <ul> in a width constrained div and setting
the <li> to float left, but I know that shorter length <li> elements
will cause more bullets per "line" than longer ones. How can I create a
two or three column list of bullet points?
TIA
Brett
I want to display an unordered list, generated by an array, in two
columns. How can this be done?
> <ul>
> <?php
> // take text field and create array using explode
> $farray = explode(', ', $row_fieldArray['features']);
> // loop through the array to process each line
> foreach ($farray as $value) {
> // output each line as a <li> element
> echo "<li> $value </li>"; }
> ?>
> </ul>
I thought of enclosing the <ul> in a width constrained div and setting
the <li> to float left, but I know that shorter length <li> elements
will cause more bullets per "line" than longer ones. How can I create a
two or three column list of bullet points?
TIA
Brett
