Re: Cannot get this one correct and working, though simple!
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: Cannot get this one correct and working, though simple!

From: Geoff Berrow <blthecat@ckdog.co.uk>
Date: Fri Dec 30 2005 - 17:43:02 CET

Message-ID: <E_adnTHBbOGRzyjeRVn-uA@comcast.com> from Jerry Stuckle
contained the following:

>>>Single quotes! Try Double.
>>
>>
>> Single quotes are fine as is the code AFAICT.
>>
>
>No, with single quotes $i is not expanded. It would be with double quotes.

Looking at the code again he has

echo "<a href='$i.jpg' target='main'><img src='thumb$i.jpg'></a>

Now that can't be right or he's have a parse error, so I assumed he had

echo "<a href='$i.jpg' target='main'><img src='thumb$i.jpg'></a>";

which, for $i =1 gives:-
<a href='1.jpg' target='main'><img src='thumb1.jpg'></a>

In which case it would be in double quotes and would be expanded. In
fact the OP had already said it was expanded.

-- 
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/
Received on Tue Jan 3 03:50:36 2006