Hello im am working on a site that will have mp3s to stream that people will upload. What i want it to do is look for (lofi) in the file name and if it dose make it a link. this it what I have right now and it kinda works in the fact that it will search for (lofi) and make it a link in the right area but it will make 2 entries in the fist I.E.
song #1.mp3
HI FI
lofi
song #1 (lofi)
HI FI
LO FI
you can see what i mean @
http://christianmusiciancoalition.org/listen.php?txtBandID=9
with the file NFS - Romelus 3 .mp3
this is what i have right now
if($no == NULL) {
if(eregi("(lofi)", $file) != true) {
foreach ($files as $file) {
print "
<table width=\"100%\" border=\"0\">
<tr>
<td><a type=\"audio/x-mpegurl\" href=\"play.php?file=http://christianmusiciancoalition.org$url/$file\">$file </a></td>
</tr>
<tr>
<td><a type=\"audio/x-mpegurl\" href=\"play.php?file=http://christianmusiciancoalition.org$url/$file\"><img src=\"images/play.gif\" width=\"15\" height=\"15\" border=\"0\" align=\"absmiddle\"> HI FI Play</a></td>
</tr>
<tr>";
if(eregi("(lofi)", $file)) {
print "
<td><a type=\"audio/x-mpegurl\" href=\"play.php?file=http://christianmusiciancoalition.org$url/$file\"><img src=\"images/play.gif\" width=\"15\" height=\"15\" border=\"0\" align=\"absmiddle\"> LO FI Play</a></td>
";
}
else {
print "
<td ><img src=\"images/play.gif\" width=\"15\" height=\"15\" border=\"0\" align=\"absmiddle\">LOW FI Play</td>
";
}
print "</tr>
</table>
<br />\n";
}
}
}
else {
echo "$no";
}
Any help will be great and thank you in advance