Ref id in php/mysql

How to do that, please explain.

Its a bit complicated. Please see below, i’m trying to explain.
I’m getting some data from a xls file…from the file i’m getting column DEFG data under one field QTY in mysql table.
https://www.sitepoint.com/community/t/php-excel-reader-issue/276568

https://stackoverflow.com/questions/46432063/getting-excel-row-data-to-mysql-column-in-php/46463308#46463308

Now I need to retrieve the data from mysql table to show in a html table as it is in the excel file. I mean like D-F-E-G column. I hope you got my point.