SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jan 2009
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    turning an echo into a Link

    hi
    i am trying to turn this statement into a link because the data in MySQL is storing some links for me (as TEXT)

    echo $result['Menu'];

    i tried using

    echo <a href=\"$result['Menu']\">;

    but this just caused the page not to load at all.
    am i doing something obvious wrong? any help would be great

    Thank you for your time

  2. #2
    SitePoint Evangelist simshaun's Avatar
    Join Date
    Apr 2008
    Location
    North Carolina
    Posts
    438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try
    PHP Code:
    echo "<a href=\"{$result['Menu']}\">";
    // or
    // echo '<a href="' . $result['Menu'] . '">'; 

  3. #3
    SitePoint Member
    Join Date
    Jan 2009
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i was so close, yet so far
    Thank you very much


Bookmarks

Posting Permissions

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