Código PHP:
<?php
while($mifila = mysql_fetch_array($myconsulta)){
$x++;
if($x == $total){ $separador = " "; }else{ $separador = ","; }
?>
{url: 'images/<?php print $mifila['img_premio']; ?>', identificador: '<?php print $mifila[' id_premio']; ?>', title: '<?php print $mifila['name_premio']; ?>'}<?php print $separador; ?>
<?php
}
?>
Código HTML:
function xxx(item) { return '<div id="cont_imagen"><img src="' + item.url + '" width="75" height="60" alt="' + item.title + '" onclick=MuestraContenido(\"pagina.php?v1="' + item.identificador + '"\") class="cursor" /><br/><img src="images/cog_edit.png" class="cursor"></div>'; };