Page 1 of 1

Begginer needs big help on a href function

Posted: Sun Sep 13, 2009 2:38 pm
by vestmar
Hy everyone.

This string:

$swRegisteredMessage = '{domain} is <span style="color: red;">Registered.</span>';

Returns:

boys.com is Registered.

How can I use the "a href" function in my string, to be able to click on and go to "boys.com"?

THanks in advance for your answers!

V.

Re: Begginer needs big help on a href function

Posted: Sun Sep 13, 2009 2:43 pm
by jackpf
Umm...I don't think an anchor tag is any sort of function....but whatever.

Have you tried putting

Code: Select all

<a href="http://{domain}">domain</a>
??

I can't say exactly, because you've not stated how this template is being parsed.

Re: Begginer needs big help on a href function

Posted: Sun Sep 13, 2009 2:50 pm
by vestmar
YEAP your the king :)

It works ok BUT:
1) the ".com" dissapears
2) how can i make it open in a new window

THANKS AGAIN KING ;)

v.

Re: Begginer needs big help on a href function

Posted: Sun Sep 13, 2009 3:00 pm
by vestmar
I got it my self:

the good syntax is:

$swRegisteredMessage = '<a href="http://{domain}" target="_blank" >{domain}</a> is <span style="color: red;">Registered.</span>';

Thanks again "King" of you kingdom :)

Believe it or not this is my third look ever in a php code :)

All the best!

P.s. I will be definitely returning as i am learning php

Re: Begginer needs big help on a href function

Posted: Sun Sep 13, 2009 3:29 pm
by jackpf
Lol no problem.

I only refer to it as my kingdom because I am god there 8O

You know...I created it and stuff...

But yeah, good luck and stuff.