Posted by Thomas Hamacher on 10/30/07 14:28
Chris schrieb:
> How can I change the following snippet to have the array key start at
> 1 and not 0?
You could unshift the array and then delete the new item immediately,
but this ugly and makes no sense, since you can work with your array
without transformation.
array_unshift($periods);
unset($periods[0]);
[...]
> // Periods
> for ($periods=1;$periods <=$num_periods;$periods++) {
> $eachperiod = $weekdays*$num_periods+$periods;
for($periods = 0; $periods < $num_periods; $periods++) {
$eachperiod = $weekdays * $num_periods + $periods + 1;
}
Navigation:
[Reply to this message]
|