|
Posted by Tim Streater on 09/06/07 14:54
In article <1189090148.229899.215350@w3g2000hsg.googlegroups.com>,
macca <ptmcnally@googlemail.com> wrote:
> > <?php
> > $fred = 'Click here to visit my site;
> > echo "<a href='www.mydomain.com'>$fred</a>";
> > ?>
>
>
>
> Shouldnt that be :
>
> echo "<a href='www.mydomain.com'>{$fred}</a>";
>
>
> Seriously, What's the deal with using brackets inside am
> interpolation?
I always do this:
echo "<a href='www.mydomain.com'>" . $fred . "</a>";
Then it's a lot clearer (to me, at any rate), due to reduced nesting.
Navigation:
[Reply to this message]
|