I want to print list of image address in jquery function using php(adodb) and smarty.
i need to this :
$.lightbox(["/media/photos/tmb/4.jpg", "/media/photos/tmb/3.jpg", "/media/photos/tmb/6.jpg"]);
i try with this (just simple for test) :
{/literal} {if $photos} $.lightbox(["{"\", \""|implode:$photos}"]); {/if}{literal}
result is :
$.lightbox(["Array", "Array", "Array", "Array", "Array", "Array", "Array", "Array", "Array", "Array", "Array"]);
Actually, i need to replace array with images address.
images address (dynamic loop) :
{$relative}/media/photos/tmb/{$photos[i].PID}.jpg
without jquery function, i list images with this methods :
{if $photos}
{section name=i loop=$photos}
{$relative}/media/photos/tmb/{$photos[i].PID}.jpg
{/section}
{/if}
php code:
$sql = "SELECT PID, caption FROM photos WHERE AID = " .$aid. " AND status = '1' LIMIT " .$limit;
$rs = $conn->execute($sql);
$photos = $rs->getrows();
$smarty->assign('photos', $photos);
how to print list for my need? can i?