Re: Strange behaviour
| From: | Justin Patrin | Date: | Sat, 31 Jul 2004 19:29:33 +0000 |
| Subject: | Re: Strange behaviour | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-24319@lists.php.net to get a copy of this message | ||
On Sat, 31 Jul 2004 17:33:50 +0200, Schalk Neethling
<schalk@volume4.co.za> wrote:
> Hi there
>
> I have a line of PHP code that behaves very strangely, I was hoping
> someone can shed some light on this.
>
> When the line reads as follows:
> <?php echo '<a
>
> href="javascript:openWindow();">'.$row_ads['full_img'].'</a>'
> ?>
> it works find and the output is displayed. Now, when I change the line
> as follows no output is produced.
>
> <?php echo '<a href="javascript:openWindow();"><img
> src="'.$row_ads['full_img'].'" width="87"
> height="120" /></a>' ?>
>
1) Put a semi-colon at the end of the line.
2) I would suggest not using the PHP tags inline as it makes the code
hard to read
3) Have you looked at the source HTML for the page to see if anything
gets output?
<?php
echo '<a href="javascript:openWindow();"><img
src="'.$row_ads['full_img'].'" width="87"
height="120" /></a>';
?>
--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder
paperCrane --Justin Patrin--