Erindesign
03-14-2008, 03:16 AM
Hey all,
I got a music database that holds songs in this manner:
ID | Artist | Song_Name | Song_URL
Now this is pretty much links from everywhere on the web. I have adjusted the "adding" Mechanism to recognize artists on the url and split them up to recognize song name and artists so it injects them accordingly. However, sometimes it is alittle messed up.
Say I got a url that is http://domain.com/Artist/artist_Song.mp3
if I inject that, it would be:
ID | Artist | artist_Song.mp3 | http://domain.com/Artist/artist_Song.mp3
Now on the Song_Name I have made it to filter the artist name if it exists, but if it isn't capitalized, it doesn't recognize it.
$song=str_replace('$artist', "", $song);
how could I extend this function to apply to lower case artist names, say if it was Erind, it would be able to replace erind as well.
Thanx in advance,
Erind
I got a music database that holds songs in this manner:
ID | Artist | Song_Name | Song_URL
Now this is pretty much links from everywhere on the web. I have adjusted the "adding" Mechanism to recognize artists on the url and split them up to recognize song name and artists so it injects them accordingly. However, sometimes it is alittle messed up.
Say I got a url that is http://domain.com/Artist/artist_Song.mp3
if I inject that, it would be:
ID | Artist | artist_Song.mp3 | http://domain.com/Artist/artist_Song.mp3
Now on the Song_Name I have made it to filter the artist name if it exists, but if it isn't capitalized, it doesn't recognize it.
$song=str_replace('$artist', "", $song);
how could I extend this function to apply to lower case artist names, say if it was Erind, it would be able to replace erind as well.
Thanx in advance,
Erind