This probably belongs in the newbies thread, but I barely understand one dimensional arrays, and two dimensional arrays completely blow me away.
I want the values in a specific column of the two dimensional array to display in an html type table. Sounds like a simple thing, huh? Well, it's got me good and stumped.
Say I've got this data passed in from a prior page:
$2D_ARRAY = array($HTTP_POST_VARS['1D_ARRAY_A'], $HTTP_POST_VARS['1D_ARRAY_B'], $HTTP_POST_VARS['1D_ARRAY_C']);
(the number of elements in each of the 1D_ARRAYS is equal, so it should all work out fine)
I've got a for loop that constructs the rows and puts element in cells:
for ($i=0; $i<count($countervariable); $i++) {
print "<tr><td>$SOMETHINGELSE[$i]</td><td>$2D_ARRAY['1'][$i]</td>></tr>";
}
When I see the page, all I get in the 2D_ARRAY column are array references in the cells (ie. if I leave the ' marks out of $2D_ARRAY['1'][$i], the cells just say "Array[0]", "Array[1]", etc... if I leave them in I just get the [0], [1], etc.
I am actually studying the books on this stuff and am clearly lacking some basic concepts, but the the help I am getting here is a huge help and I really appreciate it. Thanks