I want to compare the current row to the next to check if the third column of the current row is the same as to the next. If not, the current row index will adjust as the new current row and check again the next row. I want to do this in php
. Can somebody help me.
UPDATED:
ID | Date | Time
------+-----------+-------
00091 | 2015-1-20 | 08:05
00091 | 2015-1-20 | 17:10
00099 | 2015-1-20 | 07:45
00099 | 2015-1-20 | 17:42
my expected outputs are:
ID | Date | Time
------+-----------+-------------
00091 | 2015-1-20 | 08:05 17:10
00099 | 2015-1-20 | 07:45 17:42