while-do +array
- From: steven@xxxxxxxxxxxxxxxxxxxxx ("Steven Macintyre")
- Date: Wed, 31 Oct 2007 13:02:46 +0200
Hiya,
I have the following code ... which only seems to result in one item ...
which is incorrect ... can anyone spot my problem?
if ($armbase != "") {
$options = explode(",", $armbase);
$text .= '<table ><tr>';
$get_endRow = 0;
$get_columns = 8;
$get_hloopRow1 = 0;
do {
if($get_endRow == 0 && $get_hloopRow1++ != 0) {
$text .= '<tr>';
$text .= '<td valign="top" width="60">';
$text .= "<img
src='".e_BASE."images/options/armbase/".$value."'>";
$text .= '</td>';
$get_endRow++;
}
if($get_endRow >= $get_columns) {
$text .= '</tr>';
$get_endRow = 0;
}
} while(list($key,$value) = each($options));
if($get_endRow != 0) {
while ($get_endRow < $get_columns) {
$text .= '<td> </td>';
$get_endRow++;
}
$text .= '</tr>';
}
$text .= '</table>';
}
The purpose of the code is to create 8 colums and populate based on the
total results returned from the while-do check
Thanks in advance
Steven
.
- Follow-Ups:
- Re: [PHP] while-do +array
- From: "Robin Vickery"
- Re: [PHP] while-do +array
- From: Robert Cummings
- Re: [PHP] while-do +array
- Prev by Date: crop an image
- Next by Date: Re: [PHP] crop an image
- Previous by thread: crop an image
- Next by thread: Re: [PHP] while-do +array
- Index(es):