SOLVED:Re: trying to output a hyperlink
| From: | Damian Brown | Date: | Sun, 11 Apr 2004 06:17:38 +0000 |
| Subject: | SOLVED:Re: trying to output a hyperlink | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-183114@lists.php.net to get a copy of this message | ||
Thanks for all the help, I overlooked a simple mistake in html, I was so
much concentrating on concatenating the $link that I forgot to include the
link
I got a private email that solved it for me
--
www.phpexpert.org/truefaith.htm
"True Faith is not just when you believe in God and yourself, it is when
others begin to believe in you as well" - Damian John Paul Brown 2004
"Andy Ladouceur" <ladouceur@shaw.ca> wrote in message
news:20040411060842.98531.qmail@pb1.pair.com...
> When in doubt, view source. :) As John has already mentioned, you need
> text between the two tags to actually display in the browser. You
> probably would've seen your mistake a lot sooner if you viewed the page
> source when you first tried it out.
>
> Also, you can save yourself some time using PHP's shorthand
> concatenation operator.
>
> > <td><?php $link = '<a href="' ;
> > $link = $link . $row[2] . '">' ;
> > $link = $link . '</a>' ;
> > echo $link ; ?></td>
>
> Turns into:
>
> <td><?php $link = '<a href="';
> $link .= $row[2] . '">';
> $link .= 'Click here</a>';
> echo $link; ?></td>
>
> Although, it could be shortened even more, to:
>
> <td><?php $link = "<a href=\"".$row[2]."\">Click
> here</a>";
> echo $link;?></td>
>
> But I imagine you're doing it with more lines for legibilities' sake.
>
> Andy
>
> Damian Brown wrote:
> > <td><?php $link = '<a href="' ;
> > $link = $link . $row[2] . '">' ;
> > $link = $link . '</a>' ;
> > echo $link ; ?></td>
> > is not working, I want to output $row[2] as a hyperlink
> > as it is the refering URL, but the above is just showing blank in the
> > output, with no link and no text in the output table
> > --
> > www.phpexpert.org/truefaith.htm
> > "True Faith is not just when you believe in God and yourself, it is when
> > others begin to believe in you as well" - Damian John Paul Brown 2004