0

我有一个图像滑块。每个图像都有自己的链接。滑块是在PHP中使用 for 循环生成的。

我想动态地将滑块中的图像链接与我网页上其他地方的链接相关联。

我在 php for 循环中做了这个:

$(document).ready(function(){
    $("#ProgrammeImmobilierNeuf")
       .attr("href", "<?php echo URL.'p-'.$picturesSlider[$i]['id_programme_ws'].'/Programme-immobilier-neuf-'.strtolower($urlVille).'/'.rewriteProgramme($picturesSlider[$i]['nom']).'.html'; ?>");
});

这不会更新链接。

有人能帮助我吗 ?

4

1 回答 1

1

我想你忘$echo URL,如果URL不是constant

..."<?php echo $URL.'p-'.$picturesSl...
于 2012-06-15T19:14:41.797 回答