Código PHP:
<?php
$tablaFotos = "inmoby_conf_fotos";
$tablaInmuebles = "inmoby_inmuebles";
$consulta2 = mysql_query( "SELECT $tablaFotos.id FROM $tablaFotos,$tablaInmuebles
WHERE $tablaFotos.id_inmueble = ".$_GET['id']." AND $tablaInmuebles.id = $tablaFotos.id_inmueble" ) or error( mysql_error() ); ?>
var photoArray = new Array(
<?php
while ( $renglon2 = mysql_fetch_array ($consulta2) ) { ?>
new Array("<?php echo "".$renglon2[id].""; ?>_fotog.jpg", "450", "321", "Visite Inmoby.com"), //esta ultima coma no la quiero!!! :(
<?php } ?>
);
y todo eso me imprime:
var photoArray = new Array(
new Array("146_fotog.jpg", "450", "321", "Visite Inmoby.com"),
new Array("147_fotog.jpg", "450", "321", "Visite Inmoby.com"),
new Array("148_fotog.jpg", "450", "321", "Visite Inmoby.com"),
new Array("149_fotog.jpg", "450", "321", "Visite Inmoby.com"),
new Array("150_fotog.jpg", "450", "321", "Visite Inmoby.com"),
new Array("151_fotog.jpg", "450", "321", "Visite Inmoby.com"),
new Array("152_fotog.jpg", "450", "321", "Visite Inmoby.com"),
);
la "," que esta marcada en "negrita" no la quiero!
Saludos