PHP issue: How do I insert a HTML link into the script?

by edmltw
3 replies
Hello there professionals!

Let's say I want to insert a <a href="www.xxxx.com">Click Here</a> into a
"define" column, or anywhere within the middle part of the php template, how I add it in so that it will appear as a normal link?

Regards,
Ed

P.S.: I tried to insert the code directly in the "define" column, all I got was plain text without the hyper-link.

P.S.S.: Any help will be GREATLY appreciated!
#html #insert #issue #link #php #script
  • Profile picture of the author bazzais
    Its a stab in the dark as I have no idea what software you are using or what you are trying to do - but remove the " quotes from your <a href="www.xxxx.com">Click Here</a>

    A link will render in most browsers without them and its probably whats breaking your php.

    Ta

    Baz
    {{ DiscussionBoard.errors[1416401].message }}
  • Profile picture of the author KirkMcD
    Never heard of a "define" column, but this is the php code:

    echo '<a href="www.xxxx.com">Click Here</a>';
    {{ DiscussionBoard.errors[1418211].message }}
    • Profile picture of the author Jeff Poulton
      Another approach is to use Javascript to insert the link conditionally upon page load. It doesn't get any easier when you're using jQuery.
      {{ DiscussionBoard.errors[1442071].message }}

Trending Topics