I am not getting any idea how to print query results in the below format using php.
I have query results which gives information like the below
Network Channel
A X
A Y
A Z
B P
B Q
C R
I can able to show the results like above way.But now i wanna show results like below
Network Channel
A x
Y
Z
B P
Q
C R
Is there any way to show like above using loops
I’ll assume you have results in some kind of associative array from a database.
Here is a rough idea; store the network value in a “last_network” variable, and check to see when it changes. When it changes, print it, otherwise print only the channel.