I was checking out a tutorial at codewalkers.com about arrays. There was this code there and I don’t understand something. Here is the code. It was listed in two chunks, which I have separated by a few spaces:
[code]<?php
$books = array(0=>array(‘name’=‘A Book’,‘price’=>9.99),1=>array(‘name’=‘Another Book’,‘price’=>17.99));
?>
n"; } ?>
[/code]
What does the line "foreach($books as $onebook)" do, and why was the variable “$onebook” not declared in the first part of the script?
Thanks