Re: Cannot get this one correct and working, though simple!
- From: Geoff Berrow <blthecat@xxxxxxxxxxx>
- Date: Fri, 30 Dec 2005 16:37:06 +0000
Message-ID: <1135959418.255476.21750@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> from
comp.lang.php contained the following:
>The problem lies in the way you embedded $i. PHP thinks you have a
>variable literally called "$i.jpg" since a period is a valid implied
>variable name character.
It is? News to me.
>
>Try this instead:
>
><img src='thumb${i}.jpg'>
>
>curly braces will separate out the valid variable name characters.
No, what he's got works, his problem is elsewhere.
See:-
<?php
$i=1;
print"<img src='thumbs$i.jpg'>";
//outputs <img src='thumbs1.jpg'>
?>
--
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/
.
- References:
- Cannot get this one correct and working, though simple!
- From: Jofio
- Re: Cannot get this one correct and working, though simple!
- From: comp.lang.php
- Cannot get this one correct and working, though simple!
- Prev by Date: Re: Cannot get this one correct and working, though simple!
- Next by Date: Re: Cannot get this one correct and working, though simple!
- Previous by thread: Re: Cannot get this one correct and working, though simple!
- Next by thread: Re: Cannot get this one correct and working, though simple!
- Index(es):
Relevant Pages
|