Arrays and CheckBoxes
I am using the new Edition of the book Beginning PHP5. In this book, the author says that we can declare an array like so:
$myArray1= array( "dog"=>"rover", "cat"=>"tom");
this part is fine; however, the author also says that we can still access the elements of the array using indexes, like so: $myArray1. Though I have tried doing this several times, it never works. Is it possible to access the array elements using indexes if we have declared keys in the array?
Secondly, in the section describing checkBoxes, the author says the value attribute contains nothing if the checkbox is not ticked. Thus, when we display, a blank space is printed; however, in my code, when the checkbox is not ticked, and I try to print the value, an error occurs. It would be really great if someone could help solve the issues.