Hello,
Here is the array:
$montharr = array(01=>"31",02=>"30",03=>"31",04=>"30",05=>"31",06=>"30",07=>"31",08=>"31",09=>"30",10=>"31",11=>"30",12=>"31");
What I am trying to do is that I am trying to access the array, and once it is on end then I want to bring the pointer at the beginning till the range ends.
For example:
I start accessing from element 8 in the array till element 1 in the array. The result will be added together.
For example:
$startpointer= 8;
$endpointer = 2;
$montharr = array(01=>"31",02=>"30",03=>"31",04=>"30",05=>"31",06=>"30",07=>"31",08=>"31",09=>"30",10=>"31",11=>"30",12=>"31");
$i;
for ($i = $montherr($startpointer); $i <= $montherr($endpointer); $i++ ) {
$sum = $month[$i]++;
}
Any suggestions? thanks in advance 🙂