Populate jPlayer playlist from MySQL database
To populate a jPlayer playlist from a MySQL database you can use the following sample code. You need to have jQuery and jPlayer loaded.
Insert the following PHP code before placement of the playlist HTML. The
while loop extracts the wanted records from the database and builds up the playlist as a Json array.
Now you can activate the player with the playlist data ready to go. Copy and paste the jQuery script code after the above PHP code. For more details on jPlayer configuration parameters, visit the jPlayer Web site.
Copy and paste the jPlayer HTML code after the above jQuery code. Don't forget to have the jPlayer CSS stylesheet loaded and adjust this as is desired.