Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   PHP issue: How do I insert a HTML link into the script? (https://www.warriorforum.com/programming/147698-php-issue-how-do-i-insert-html-link-into-script.html)

edmltw 22nd November 2009 07:46 PM

PHP issue: How do I insert a HTML link into the script?
 
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!

bazzais 22nd November 2009 08:28 PM

Re: PHP issue: How do I insert a HTML link into the script?
 
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

KirkMcD 23rd November 2009 10:33 AM

Re: PHP issue: How do I insert a HTML link into the script?
 
Never heard of a "define" column, but this is the php code:

echo '<a href="www.xxxx.com">Click Here</a>';

Jeff Poulton 30th November 2009 09:27 AM

Re: PHP issue: How do I insert a HTML link into the script?
 
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.


All times are GMT -6. The time now is 10:22 PM.