When I name variables like an array, I often come across a dilemma: Do I call my array multiple or singular?
For example, let's say I have an array of names: in PHP, I would say: $names=array("Alice","Bobby","Charles"); However, let's say I want to refer to the name in this array. For Bobby, I would say: $names[1] . However, these seams are counter-intuitive. I would rather call Bobby $name[1] , because Bobby is only one name.
So you can see a slight discrepancy. Are there conventions for naming arrays?
naming-conventions
stalepretzel Dec 28 '08 at 3:10 2008-12-28 03:10
source share