Código PHP:
$pcambio=$GV->permiteCambio($estacionactual);
foreach($pcambio as $actual){
if ($actual[0]==1){//sí permite cambio, hay que ofrecerle las locomotoras, vagones y contenedores
echo "<br><br>";
echo "<p align='left' class='Estilo1'>EN ESTA ESTACIÓN SE PERMITEN CAMBIOS EN LA COMPOSICIÓN DEL CONVOY. SI LO DESEA PUEDE CAMBIAR DE LOCOMOTORAS, VAGONES Y CONTENEDORES:</p>";
echo "LOCOMOTORAS:";
echo "<br><br>";
echo "aquí";
echo "<select name='locomotoraelegida1' id='locomotoraelegida1'>";
echo "<option value='null' selected>Seleccione la locomotora1</option>";
$resul=$GV->obtLocVagContEstacion($estacionactual, $horaestsalida, $fechaestsalida);
if(!$resul){
$nofecha=1;
}else{
$s=0;
while($linea=mysql_fetch_row($resul)){
$locom1[$s]=$linea[4];
$s++;
}//while
$locom11=array_unique($locom1);
$s=0;
while($s<sizeof($locom11)){
echo "<option value=".$locom11[$s].">".$locom11[$s]."</option>";
$s++;
}//while
}//if resul
echo "</select>";
Gracias por vuestra ayuda!