<?php
// textos
for($x = 0; $x < $arrlength; $x++) {
if ( $languages[$x][2] == 1 ) {
if ( $idioma == $languages[$x][0] ) {
$sql_textos = "SELECT
serv.id AS serv_id,
serv.fichero,
serv.titulo_{$languages[$x][0]} AS titulo,
serv.descripcion_{$languages[$x][0]} AS descripcion
FROM {$tabla_bd} AS serv
WHERE id='{$idcarga}'
";
//imagenes
$sql_img = "SELECT
id,
imagen,
imagen_thumb,
imagen_med,
leyenda_{$languages[$x][0]} AS leyenda
FROM {$tabla_bd}fotos WHERE idfamilia='{$idcarga}' ORDER by orden ASC";
}
}
}
//echo $sql_img;
$res_textos = mysqli_query($conn,$sql_textos);
$row_textos = mysqli_fetch_array($res_textos);
$res_img = mysqli_query($conn,$sql_img);
$res_img2 = mysqli_query($conn,$sql_img);
$res_img2_amp = mysqli_query($conn,$sql_img);
echo mysqli_error($conn);
?>