Hey guys,
for a website, I am making an array:
PHP Code:
<?php
$title="Lists";
include("./header.php");
print "These are our lists;";
$lists= array(
array("log"=>"blah", "foo"),
array("list"=>"fa", "blah")
);
foreach($lists as $val)
{
foreach($val as $key=>$fin_key)
{
print "<br />$key:<br />$fin_key<br />";
}
print "<br />";
}
include("./footer.php");
?>
When I try this, I get this:
Lists
These are our lists;
log:
blah
0:
foo
list:
fa
0:
blah
I was wondering, why do I get "0:" in there?
Ilya
EDIT: I know that using the foreach is more C style than PHP...O well!
