Código PHP:
   <?php
$c=mysql_connect("localhost","root",""); 
mysql_select_db("ANDALUCIA",$c);
$fp=fopen("datos3.xml","r"); 
while ($linea=fgets($fp,1024))
{
if (substr($linea,0,16)=="<ALUMNOS_CURSOS>") 
{
 
$linea=fgets($fp,1024);
if(substr($linea,1,16)=="<N_SOLICI_EXTER>")
$N_EXT=substr($linea,17,-18);
 
 
$linea=fgets($fp,1024);
 
$linea=fgets($fp,1024);
if (substr($linea,1,11)=="<N_CUR_AJE>") 
$N_CUR=substr($linea,12,strlen($linea)-25);
 
$linea=fgets($fp,1024);
if (substr($linea,1,9)=="<NIF_NUM>") 
$NIF_ALU=substr($linea,10,strlen($linea)-21);
 
$linea=fgets($fp,1024);
$linea=fgets($fp,1024);
$linea=fgets($fp,1024);
$linea=fgets($fp,1024);
$linea=fgets($fp,1024);
$linea=fgets($fp,1024);
 
 
$linea=fgets($fp,1024);
if (substr($linea,1,12)=="<EVALUACION>") 
$EVA=substr($linea,13,strlen($linea)-27);
 
$PREV_FECHA=0;
$PREV_HORA=0;
$PREV_SW=0;
$INS_SW=0;
[COLOR=darkorange]/*Aqui irian dos select con este formato mas o menos[/COLOR]
[COLOR=darkorange]Select N_SOLICI_INTER from ins_subplanes_a where (N_SOLICI_EXTER=$N_EXT)[/COLOR]
 
[COLOR=darkorange]Select N_CUR_PRO from cur where (N_SOLICI_INTER=N_SOLICI_INTER(select anterior)[/COLOR]
[COLOR=darkorange]AND N_CUR_AJE=$N_CUR)*/[/COLOR]
[COLOR=darkorange]/*El objetivo es representar la tabla siguiente, pero no se como recoger los datos[/COLOR]
[COLOR=darkorange]de la select, ni de que manera ponerlos para que me lo represente en la tabla.[/COLOR]
[COLOR=darkorange]$N_EXT y $N_CUR son extraidos del fichero xml(codigo de arriba)*/[/COLOR] 
print ("<TABLE BORDER=1>"); 
print "<TR>";
print "<TD>".$N_SOLICI_INTER."</TD>";
print "<TD>".$N_CUR_PRO."</TD>";
print "<TD>".$NIF_ALU."</TD>";
print "<TD>".$PREV_FECHA."</TD>";
print "<TD>".$PREV_HORA."</TD>";
print "<TD>".$PREV_SW."</TD>";
print "<TD>".$INS_SW."</TD>";
print "<TD>".$EVA."</TD>";
print "</TR>";
print ("</TABLE>");
 
}
}
?>    
 

