foreach - php array : how to access the "$key-1" in an associative array? -
i got existing foreach set of conditions , i'd keep , add end date beginning date of line before + 1 day
how access "$line-1" do:
foreach($tab $line){ if line before $line[beginning_date] exists $line[end_date]= line before $line[beginning_date] value +1 }
good enough?
$thelinebefore = null; foreach($tab $line){ if line before $line[beginning_date] exists $line[end_date]= line before $line[beginning_date] value +1 $thelinebefore = $line; }
Comments
Post a Comment