Necesito algo asi:
$notas=array{"luis"=>15,"maria"=>20,"pepe"=>10}
y este mi consulta sql:
Código php:
Ver original
<table width="20%" border="1"> <tr> <td>Nombre</td> <td>Notas</td> </tr> <?php $sql2="SELECT * FROM sesion WHERE idcurso=$curso"; //$nombres=array(); //$notas=array(); //$nombres[]=$row2['nbralumno']; //$notas[]=$row2['nota']; ?> <tr> <td><?php echo $row2['nbralumno'] ?></td> <td><?php echo $row2['nota'] ?></td> </tr> <?php } ?> </table>
Agradesco de antemano la ayuda que me puedan brindar.