Re: Output errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry!

Actually I always use the opposite form (external double quotes). This
works, and I think is the most legible of all proposed forms:

$d = "foo" ;
$query = " SELECT a FROM  b WHERE  c = '{$d}' " ;

Ignatius
____________________________________________
----- Original Message -----
From: "Jason Wong" <phplist@gremlins.com.hk>
To: <php-db@lists.php.net>
Sent: Tuesday, October 22, 2002 7:33 PM
Subject: Re:  Output errors


> On Wednesday 23 October 2002 01:29, Ignatius Reilly wrote:
>
> > $image does not interpolate (surrounded by single quotes)
> >
> > You must write:
> >
> >             else { echo '<p><img src="{$image}" width="201"
> > height="160"></p></td>'; }
> >
> > It is good hygiene to brace variables in somehow complicated statements
> > like these. Keeps life easier.
>
> You're still using single-quotes, so it still wouldn't work!
>
> Try any one of these:
>
> echo "<p><img src=\"$image\" width=\"201\" height=\"160\"></p></td>";
> echo "<p><img src=\"{$image}\" width=\"201\" height=\"160\"></p></td>";
> echo '<p><img src="' . $image . '" width="201" height="160"></p></td>';
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
>
> /*
> You will inherit millions of dollars.
> */
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux