Not listing string variable

This is making me so angry, I know it must be something obvious but for some reason resulting somepage.php document is not listeing $slideshow, $slideshow is just defined as $slideshow = “thumb1”; , if I just echo $slideshow; then it displays thumb1 as it should, but if I put it where i need it

echo "<a href=\"{$pathToImages}{$fname}\"";
    echo "class=\"highslide\"";
    echo "onclick=\"return hs.expand(this, { thumbnailId: \"$slideshow\", slideshowGroup: 1 })\">";
    echo "<img src=\"{$pathToThumbs}{$fname}\" alt=\"$file_name\"/></a> ";
echo "<div class=\"highslide-caption\">";
    echo "Caption for the second image in the first group. </div> ";

Then it does not work, it just shows blank on the page.

try concatinating the variable into the string instead of directly using it…

it would be like …

thumbnailId: “”.$slideshow.""

instead of

thumbnailId: “$slideshow”

Sponsor our Newsletter | Privacy Policy | Terms of Service