How to return values from different columns without repeating?

Asked

Viewed 70 times

0

I’m trying to capture and print on the screen all the categories of a table, but I wouldn’t want them to repeat themselves. Note that there are 4 columns of different categories below:

NUMEROID-----NOME-----CATEGORIA1-----CATEGORIA2-----CATEGORIA3-----CATEGORIA4
00001      wordart      Jogos         Saude          Saude         Culinaria
00002      wonderl      Noticias      Noticias       Jogos         Arte
00003      heaveng      Arte          Jogos          Jogos         Jogos
00004      flowwav      Arte          Saude          Jogos         Saude

I would like to print (in php) a list on the screen as in the example below: (If possible in alphabetical order)

  • Artistry
  • Culinary
  • Games
  • News
  • Health

Thank you all.

1 answer

1

Browser other questions tagged

You are not signed in. Login or sign up in order to post.