PHP show query results
Hi Im currently showing my results as the below code, but that code display me the results exactly as my table on my DB. I would like to display the data on one row and down one row until some field name of X column change.
if the 4 fields on column A are the same print all the columns on one row and then if the next 5 fields on column A are differents as the first 4 fields down one row until a field name of A column change.. Thanks lot.. PHP Code:
----------------------------------------- Champs 1 2 Champs 3 4 Champs 5 16 TETE 1 2 TETE 3 4 TETE 5 16 but I would like to print as: ------------------------------------------- Champs 1 2 3 4 5 16 TETE 1 2 3 4 5 16 |
You should just be able to change the while loop and using a hash array:
Code:
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { |
All times are GMT -5. The time now is 01:50 PM. |