I'm creating a dynamic webpage and I'm trying to load .gif picture however issues arise when I put part of the file and directory in a saved variable. Here is working code that pulls the image:
$home = '<img id="'. $result1 .'" src="teams\pit. gif" style="Z-INDEX: 108; LEFT: 842px; POSITION: absolute; TOP: 226px"/>';
echo $home;
As you can see the image displays in the absolute position and thus works fine but its not dynamic. Here is what doesn't work:
$home = '<img id="'. $result1 .'" src="teams\'. $result1 .'.gif" style="Z-INDEX: 108; LEFT: 842px; POSITION: absolute; TOP: 226px"/>';
echo $home;
where $result1 is pulled from a database and is "pit"
I already have a banner on this page that dynamically loads that works fine however this is being stubborn.
UPDATE Working on the problem I've seemed to have narrowed it down to a problem with the \ followed immediately by the '. part.
Thanks,
Oliphaunt
$home = '<img id="'. $result1 .'" src="teams\pit. gif" style="Z-INDEX: 108; LEFT: 842px; POSITION: absolute; TOP: 226px"/>';
echo $home;
As you can see the image displays in the absolute position and thus works fine but its not dynamic. Here is what doesn't work:
$home = '<img id="'. $result1 .'" src="teams\'. $result1 .'.gif" style="Z-INDEX: 108; LEFT: 842px; POSITION: absolute; TOP: 226px"/>';
echo $home;
where $result1 is pulled from a database and is "pit"
I already have a banner on this page that dynamically loads that works fine however this is being stubborn.
UPDATE Working on the problem I've seemed to have narrowed it down to a problem with the \ followed immediately by the '. part.
Thanks,
Oliphaunt
Comment