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




Jofio wrote:
> I have 40 or jpeg files which I want them displayed in a frame called
> "main" upon clicking thumbnails of the same pics in a "leftMenu" frame.
> The thumbnail jpeg files are called thumb1, thumb2, thumb3, thumb4,
> ..., thumb40. These files are smaller versions (50pixelX50pixel) of the
> larger jpeg files called 1, 2, 3, 4, ..., 40 which I want them
> displayed.
>
> To display the hyperlinked thumbnails in the "leftMenu" frame I have it
> in a loop. [See the code snippet]
>
> But my problem is that part of the code ...<img src='thumb$i.jpg'> ...
>
> It doesn't display the intended thumbnail jpeg files; instead, it
> display the larger version of the files as thumbnails which takes
> longer to load.
>
[snip]

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.

Try this instead:

<img src='thumb${i}.jpg'>

curly braces will separate out the valid variable name characters.

Phil

.



Relevant Pages

  • Re: Cannot get this one correct and working, though simple!
    ... it's a gallery in frame and you click on the thumb and it shows the larger one on the right. ... I have 400 images and they are all in a folder, then I used a tool thumbnail express to ... >I have 40 or jpeg files which I want them displayed in a frame called ... >To display the hyperlinked thumbnails in the "leftMenu" frame I have it ...
    (comp.lang.php)
  • Re: Cannot get this one correct and working, though simple!
    ... "main" upon clicking thumbnails of the same pics in a "leftMenu" frame. ... ..., thumb40. ... display the larger version of the files as thumbnails which takes longer to load. ...
    (comp.lang.php)
  • Re: JPEG active content / resolution problem
    ... I have a situation where JPEG files ... a modern browser the image loads, ... to a smaller, lower-res display. ...
    (rec.photo.digital)
  • Re: A Picture with a ComboBox
    ... haven't got your data file here and we therefore haven't got your "filled up" Combo Box and neither have we got yuour folder full of picture files. ... If the line that display the result of the Dir function shows an empty string the obviously the Dir function is failing to find the file. ... And if it doesn't display the expected path and filename then you can begin to look at why it doesn't. ... I have decided to use jpeg files which have ...
    (comp.lang.basic.visual.misc)
  • Re: JPEG Display messy
    ... But the display is messy. ... It seems there is a problem with displaying large landscape JPEG files. ... Almost every issue to do with the v10 library that has been noted on this newsgroup either existed in v9, was known in the v10 beta or found in the first couple of weeks after v10 was released several years back. ... Of course the next version may require Windows Vista as a platform, just as v10 requires Windows XP. ...
    (microsoft.public.windowsmedia.player)