fancybox : 如何写这个语句

fancybox :how to write this statement

如何包含我们的图片路径

<a href="image.jpg" data-fancybox="images" data-caption="My caption">
    <img src="thumbnail.jpg" alt="" />
</a>

我在 iamge dynamicaly 中单击时编写了图像滑动代码,但出现错误

Parse error: syntax error, unexpected '' '' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ';' in D:\xampp\htdocs\PHP\gallery2.php on line 68

echo '  <a href='/IMAGES/".$image."' </a> ';
echo "<img src='IMAGES/".$image."'>  ";

应该做哪些更改才能获得正确的图像幻灯片

试试这个

echo '<a href="/IMAGES/'.$image.'" data-fancybox="images" data-caption="My caption">.
<img src="/IMAGES/'.$image.'" alt="" />
</a>' 

我假设 /IMAGES/ 是文件夹名称而不是路径