Reply to Re: What's wrong with this simple line of code?

Your name:

Reply:


Posted by Rik on 03/10/07 10:41

Mike Russell <RE-MOVEmike@Curvemeister.comRE-MOVE> wrote:

> <fishmonger1972@gmail.com> wrote in message
> news:1173481411.332250.5390@64g2000cwx.googlegroups.com...
>> I'm a librarian trying to put a finishing touch on an online material=
s
>> catalog. The line below seems to do nothing in my program.. And I
> ...
>> <?php if (defined($book_review_url)) echo "<a href=3D\"$book_review_u=
rl
>> \">Click here for reviews for $title on Amazon.com</a>"; ?>
>
> Others have mentioned use of isset(). Two other errors are that you =

> should
> not escape the quotes in this situation, and use . to concatenate =

> strings:
>
> echo "<a href=3D" . $book_review_url . ">Click here for reviews for $t=
itle =

> on
> Amazon.com</a>"
> (watch for line breaks in this posted message)
>
> There are some things you can do to make writing code like this easier=
.. =

> You
> can use an IDE with a built-in syntax checker to find errors as you ty=
pe
> them in, instead of later - eclipse is my current favorite, and there =
are
> other excellent ones, or use php -l to do a quick syntax check.

Check, I'm using UltraEdit myself, and a quick Ctrl+Shift+1 really helps=
=

in syntax checking (And configurable tools rool. I do not need expensive=
=

packages as long as can use any custom tool I desire :-)

> Also, copy code that others have written, rather than create it yours=
elf
> from scratch.

Ammendment: you _do_ have to understand the code others have written IMH=
O.
-- =

Rik Wasmus
Posted on Usenet, not any forum you might see this in.
Ask Smart Questions: http://tinyurl.com/anel

[Back to original 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

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