$temporadas=array();
$regimenes=array();
$tabla=array();
while ($registro=mysql_fetch_assoc($consulta)) {
//datos
$tabla[$registro["temporada"]][$registro["tipo_tarifa"]][$registro["regimen"]]=$registro["precio"];
//tarifas
$tarifas[$registro["tipo_tarifa"]]=$registro["tipo_tarifa"];
//para la tabla de temporadas
$temporadas[$registro["uuid_temporada"]]["nombre"]=$registro["temporada"];
$temporadas[$registro["uuid_temporada"]]["abreviatura"]=$registro["temporada_abreviada"];
$temporadas[$registro["uuid_temporada"]]["descripcion"]=$registro["periodo"];
//para la tabla de regimenes
$regimenes[$registro["regimen_abreviado"]]=$registro["regimen"];
}//fin while
?>
Now, we show you our price list in relation with each of the seasons which we have, pay attention in our offers and you can spend a fantastic stay in our establishment at a price that you can't imagine. Do not leave it to escape!
|
|
//sacamos las temporadas
foreach ($tabla as $c1=>$v1) {
?>
|
|
//sacamos las cabeceras (tarifas)
foreach ($tarifas as $k=>$v) {
?>
|
}
?>
$color=1;
//sacamos los datos
foreach ($regimenes as $k=>$v) {
if ($color>0) {
$color_code="#E8F4F6";
} else {
$color_code="#F6FDFF";
}
$color*=-1;
?>
|
foreach ($tarifas as $k2=>$v2) {
?>
if ($tabla[$c1][$v2][$v]!="") {
echo $tabla[$c1][$v2][$v];
if (is_numeric(str_replace(",","",$tabla[$c1][$v2][$v]))) {
echo " €";
}
} else {
echo "No disponible";
}
?>
|
}
?>
}
?>
|
}
?>
|