I am trying to figure out how to format and display information in an array.
My arrays are set up as follows.
$foo = array(
array("key1"=>"value1",
"key2"=>"value2"),
array("key1"=>"value3",
"key2"=>"value4")
);
$bar = array(
array("key1"=>"value1",
"key2"=>"value2");
);
$_SESSION['foo'] = $foo;
$_SESSION['bar'] = $bar;
How would I create a loop that will display the data in a table from only the foo array and for each array within foo array within the session?
ie
while (somthing loops)
do {
printf ("<tr><td>key1</td><td>key2</td></tr>");
}
Well something along that line anyway.
Am I making sense?
Thanks
g