I have an array of song artists and songs indexed by an id, i need a way of taking out all the artists names. However as there are multiple lines for each artist i have come accross a problem when only displaying the artist once. Another problem is that the artists are not grouped together so i need to store the artists that i have already passed and havent been matched so i can check the next artist.
I know it sounds confusing, but i hope you understand what i mean! Any help would be appreciated.
Jamie
Here's a real wasy way:
$artists = array(); foreach($songs as $song) { $artists[$song['artist']] = $song['artist']; }
You'll only ever get one of each artist. Enjoy :-)
-- paperCrane <Justin Patrin>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php