PDA

View Full Version : scripting question


systrum
1st January 2005, 09:55
I'm limited in my scripting ability and hope someone may take an interest and help.

I am currently using php, and i'm able to display all my track info and link to a music label that supplies me with music.

viewable here (http://www.systrum.net) ... the url will display between brackets as follows

artist - track [websiteURL]

but only when a track from that specific label is played

using this code ...

<div class="box_body">
<table class="box_content" cellpadding="0" cellspacing="0" border="0" >
<tr>
<td class="track" id="current_track"><?php print str_replace("[www.URL.com]", "[<a href='http://www.URL.com'>LINK NAME</a>]", $song_title); ?></td>
<td class="time" id="now_playing">Now</td>
</tr>

<?php
while(list($key,$val) = each($con_song_print)) {
echo "<tr>\n";
$key = preg_replace( '/(http|ftp)+(s)?:(\/\/)((\w|\.)+)(\/)?(\S+)?/i', '<a href="\0">\4</a>', $key );
echo "<td class=track>";
echo str_replace("[www.URL.com]", "[<a href='http://www.URL.com'>LINK NAME</a>]", $con_song_print[$key]) . "</td>\n";
echo "<td class=time>$playtime[$key]</td>\n";
echo "</tr>\n";
}
?>

this was written for me a while back and i would like to add URL's from other labels also instead of just the one that is being displayed now.

would anybody be able to assist by demonstrating the code for how to add multiple label URL's?

ravetrax
2nd January 2005, 21:56
you have access to mysql?