os comento mi problema, nesecito realizar una consulta a una base de datos que me genere lo siguiente:
![](http://s2.subirimagenes.com/imagen/previo/thump_4331094estimadocontent.png)
pero el resultado que he conseguido es este:
![](http://s3.subirimagenes.com:81/imagen/previo/thump_4331095realcontent.png)
y aqui esta el codigo que uso:
Código PHP:
<? include "config.php"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Prueba de organizacion de datos en matriz</title>
</head>
<?
echo "<h1>".$nom_col."</h1>";
echo $lemacol;
?>
Prueba de organizacion de datos en matriz
<br /><br />
<table border="1" align="center" width="40%">
<?
$query="select alumnos.nombres_alum, alumnos.apellidos_alum, acudiente.nombre_acu, acudiente.apellidos_acu, alum_acu_rel.parent from alumnos, acudiente, alum_acu_rel where ((alumnos.Ident_alum = alum_acu_rel.ident_alum) and (acudiente.Ident_acu = alum_acu_rel.ident_acu) and (alumnos.ident_alum=1234567891))";
$result=mysql_query ($query, $link);
//$array=mysql_fetch_array($result);
while ($array=mysql_fetch_array($result)) {
$nombres=;
$apellidos=$array["apellidos_array"];
echo "<tr>\n";
echo "<td>".$array["nombres_alum"]." "."$apellidos</td>\n";
while ()
echo "<tr><td>".$array["parent"].": ".$array["nombres_acu"]." ".$array["apellidos_acu"]."</td></tr>\n";
}
?>
</table>
<body>
</body>
</html>