Results 1 to 2 of 2

Thread: How can i do this?

  1. #1
    Join Date
    Jan 2006
    Posts
    52

    How can i do this?

    Hey guys,

    on my website there is a page which pulls some articles from a database, and on that page it displays things like the article, author name, author link etc. the thing is right now the page displays the authors link like www.swiftmediauk.co.uk but we want it to say "View Website".

    This is the code that pulls that link:

    Code:
    if($row['link . $i'] != null)
                    {
                        echo("<a href=\"http://" . $row['link$i'] . "\">" . $row['link$i'] . "</a><br />");
                    }
    Can anybody tell me what that line should read to make the link appear as View Website please?

  2. #2
    Join Date
    Feb 2007
    Location
    Ireland
    Posts
    1,007
    Just change the code to this:

    Code:
    if($row['link . $i'] != null)
    {
       echo("<a href=\"http://" . $row['link . $i'] . "\">View Website</a><br />");
    }
    Last edited by Alan; 05 Feb 2007 at 06:13 AM. Reason: Mistake with code

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •