Can someone help me create a table in where I can use the other rows as columns?
My sample database looks like this:
| NAME | DATE | TIME |TYPE |
| john | 03-05-2017 | 06:00 | AM IN
| john | 03-05-2017 | 11:00 | AM OUT
| john | 03-05-2017 | 13:00 | PM IN
| john | 03-05-2017 | 16:00 | PM OUT
| john | 03-06-2017 | 06:00 | AM IN
| john | 03-06-2017 | 11:00 | AM OUT
| john | 03-07-2017 | 06:00 | AM IN
| john | 03-07-2017 | 11:00 | AM OUT
| john | 03-07-2017 | 13:00 | PM IN
| john | 03-07-2017 | 16:00 | PM OUT
How can I show it like this in PHP table:
| DATE | AM IN |AM OUT | PM IN | PMOUT
03-05-2017 06:00 |11:00 | 13:00 |16:00
03-06-2017 06:00 |11:00 | NULL | NULL
03-07-2017 06:00 |11:00 | 13:00 |16:00
I have uploaded the image so that I can explain it better