|
Posted by Geoff Berrow on 03/10/07 12:59
Message-ID: <4FvIh.2507$FG1.2028@newssvr27.news.prodigy.net> from Mike
Russell contained the following:
>> <?php if (defined($book_review_url)) echo "<a href=\"$book_review_url
>> \">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=" . $book_review_url . ">Click here for reviews for $title on
>Amazon.com</a>"
>(watch for line breaks in this posted message)
Umm...ITYM
echo '<a href="' . $book_review_url . '">Click here for reviews for
'.$title.' on Amazon.com</a>';
But being lazy I'd usually do
echo "<a href='$book_review_url '>Click here for reviews for $title on
Amazon.com</a>";
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Navigation:
[Reply to this message]
|