Forum Moderators: coopster
Here is the function to display the Link, Description and URL:
$linkshtml .= "<p><a href=\"".$link->url."\" $nwin>".$link->title."</a>$prhtml<br>\n<span class=\"linkdescription\">".$link->description."</span><br><span class=\"url\">".$link->url."</span></p>\n\n";
All the URL's are entered in the database as http://www.example.com but I want them displayed like www.example.com on the site...
Any ideas?
ty
[edited by: jatar_k at 10:26 pm (utc) on June 16, 2005]
$display_link = str_replace( 'http://', '', $link->url );
$linkshtml .= '<p><a href="'.$link->url.'" $nwin>'.$link->title.'</a>$prhtml<br>\n<span class="linkdescription">'.$link->description.'</span><br><span class="url">'.$display_link.'</span></p>\n\n';
Regards,
Birdman
PS. It's nice to use single quotes to surround html strings, because it eliminates the need to escape your double quotes within those strings.