$a[]="Anna";
$a[]="Brittany";
$a[]="Cinderella";
$a[]="Diana";
$a[]="Eva";
$a[]="Fiona";
$a[]="Gunda";
When declaring it this way, does it automatically increase the index? Why is this ideal?
Yes, it does. See the PHP arrays guide. Note that if you want to delete the array, you can use:
unset($a);
Or if you want to make $a become an empty array, you can use:
$a = array();
$a = array('Anna', 'Brittany' ... )