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

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -