The structure of the MySQL database table is like this:
ID | subject | Score |
---|---|---|
a1 | PHP | 50 |
a1 | Javascript | 70 |
a2 | PHP | 40 |
a2 | Javascript | 80 |
a3 | PHP | 60 |
a3 | Javascript | 90 |
I want to select the subjects and scores of each ID and display the result in an HTML table like this:
ID | PHP | JavaScript |
---|---|---|
a1 | 50 | 70 |
a2 | 40 | 80 |
a3 | 60 | 90 |
Any help will be appreciated. Thanks!