You are here: Re: Cannot get this one correct and working, though simple! « PHP Programming Language « IT news, forums, messages
Re: Cannot get this one correct and working, though simple!

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация