I am trying to display data from a MySQL table using PHP inside html page, wrapping data in HTML table.
I have 11 columns in a MySQL table and x rows, among which i need just 6 columns for all rows to get printed as HTML table. Which i am able to do.(Successfully)
My Approach:
$result = mysqli_query($connect, "SELECT order_id, order_name, order_from, order_to, order_pickup, order_dropoff FROM users");
// Printing results in HTML
echo "\n";
while ($line = mysqli_fetch_array($result, MYSQL_ASSOC)) {
echo "\t<tr id='$line[order_id]'>\n";
foreach ($line as $col_value) {
echo "\t\t<td>$col_value</td>\n";
}
echo "\t</tr>\n";
}
echo "\n";
Output:
My Issue:
Among these 6 columns i want 1 column named order_id to be the id of the row (tr), so now i want only remaining five as table-cell's td's. I don't want the value of order_id column as table cell.

if