When I'm naming array-type variables, I often am confronted with a dilema: Do I name my array plurally or singularly?
For example, let's say I have an array of names: In PHP I would say: $names=array("Alice","Bobby","Charles");
However, then lets say I want to reference a name in this array. For Bobby, I'd say: $names[1]
. However, this seams counterintuitive. I'd rather call Bobby $name[1]
, because Bobby is only one name.
So, you can see a slight discrepancy. Are there conventions for naming arrays?