|
Posted by Geoff Berrow on 12/30/05 18:37
Message-ID: <1135959418.255476.21750@g14g2000cwa.googlegroups.com> 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/
Navigation:
[Reply to this message]
|