Page 1 of 1

concatenation..... Please help [solved]

Posted: Tue Feb 03, 2004 3:08 pm
by nutstretch
I have a table in my database which holds the id to my product. All the images for the various product have the same id. they are all .jpg file type.

To save space in my database, i would like to form the address of the image from the ID

for example

$image = "gifs/" & $row['StyleID'] & ".jpg"

I tried this but it didn't work.

Can anyone tell me if this is possible and what i am doing wrong.

Any help appreciated

Posted: Tue Feb 03, 2004 3:25 pm
by jaxn

Code: Select all

<?php
$image = "gifs/".$row['StyleID'].".jpg";
?>
That is all there is to it. A period "." concatenates.

-Jackson

Posted: Tue Feb 03, 2004 3:29 pm
by nutstretch
many thanks