what in your opinion more standard / readable / efficient code of array declaration :
one way :
$days = array(1=>'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');
then use : $days[$value]
or the second way :
$days = array('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');
then use : $days[$value-1]
update : i cant sure that the values be in [0-6] , because that i dont offer 3 way.
Definitely the first one (when keys are correctly defined).
In the second one you need to do a minus (extract) this
is an unnecessary cpu cyclemakes your code less readable and less maintenable.Edit: I hope all of you lazy programmers are happy out there.