RE: [PHP] Novice PHP Variable/Link Question
| From: | Gryffyn, Trevor | Date: | Fri, 17 Sep 2004 13:49:19 +0000 |
| Subject: | RE: [PHP] Novice PHP Variable/Link Question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-196945@lists.php.net to get a copy of this message | ||
Alternately, you can do it the lazy way like me:
<a href="<?=$url?>"><?=$url?></a>
<? Echo $url; ?>
Is the same as...
<?=$url?>
I also think that's a little easier to read. But that's my preference
in style.
-TG
> -----Original Message-----
> From: Greg Donald [mailto:destiney@gmail.com]
> Sent: Thursday, September 16, 2004 6:02 PM
> To: revDAVE
> Cc: PHP
> Subject: Re: [PHP] Novice PHP Variable/Link Question
>
>
> On Thu, 16 Sep 2004 14:54:34 -0700, revDAVE
> <coolcat@hostalive.com> wrote:
> > How can I use a PHP variable as the destination for a link?
> >
> > <? $mylink = 'thispage.htm'
> >
> > <a href="thispage.htm">go here</a>
> >
> > With var...? How do I write this....?
> >
> > <a href="??? $mylink ???">go here</a>
>
>
> <a href="<?php echo $url;?>"><?php echo $url;?></a>
>
>
> --
> Greg Donald
> http://gdconsultants.com/
> http://destiney.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>