hello,
i am trying to create a table that displays the list of values from an array. I want the results to be in two colums and as many rows as half the results. (ex: 11 values into 2 columns give you 6 rows with 2 values in each row.)
i am trying to use somethign like:
#################
print "<table width=\"250\">\n";
for ($i = 0; $i < $online_count; $i++)
{
$online_val1 = $online_val_list[$i];
$online_val2 = $online_val_list[$i+1];
print "<tr><td>".$online_val1."</td><td>".$online_val2."</td></tr>\n";
}
print "</table>\n";
##################
but this is just giving me two columns but with the same record in row one as the first in row two.
i tried to use $i+2 in the for statemtn but that created some loop that i need to quit efrom and only gave me the first two records.
QUESTION:
can i select the ODD and EVEN key values from the array as different sets?
i hope this makes sense.
thanks