You are here: Re: Just Learning PHP « PHP Language « IT news, forums, messages
Re: Just Learning PHP

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация