Author Topic: Simple script that print Artist only  (Read 434 times)

MickeMM

  • Guest
Simple script that print Artist only
« on: September 05, 2021, 10:51:32 AM »
Hello folks! :)

Does anyone have a simple php code to print Artistname.
The best is if print like this:
Abba | Madonna | Modern Talking

If its possible, else Abba Madonna Modern Talking works :)

Thanks! <3

mdj

  • Jr. Member

  • Offline
  • **
  • 57
Re: Simple script that print Artist only
« Reply #1 on: September 29, 2021, 01:09:35 PM »
MySql to get just the artist.
Code: [Select]
SELECT artist
FROM songs
GROUP BY artist -- omit this if you want duplicates. 

When you have an array list of the artists you could do. . . 
Code: [Select]
$artistString = implode(string " | ", $array)