Click to See Complete Forum and Search --> : [RESOLVED] Cleaning Up html links


robertketter
02-10-2008, 10:48 PM
I have a php script parsing an xml document into html links using the file name as the title of the link..
example file name: Sermon20080202 - The Cameleon or the Butterfly.mp3



foreach ($xml->Contents as $Contents) {
echo '<a href="http://www.thedomain.com/'.$Contents->Key.'">'.$Contents->Key.'<a /><br />';

sample html output

<a href="http://www.thedomain.com/Sermon20080202 - The Cameleon or the Butterfly.mp3">
Sermon20080202 - The Cameleon or the Butterfly.mp3
<a /><br />

I would like to clean up the displayed link and am asking for your help...
This is what I would like the link to look like...


<a href="http://www.thedomain.com/Sermon20080202 - The Cameleon or the Butterfly.mp3">
02/02/2008 - The Cameleon or the Butterfly
<a /><br />

Could you break the file name into $date and $title and show me a sample link. I am sure I will be able to work it into my script for a better looking html output.

Thanks so very much.:)