es algun ejercicio donde obligatoriamente necesitas 2 consultas? o todo puede estar en 1 sola?
Código PHP:
Ver original// Consulta 1
$consulta = "SELECT student_id, name FROM student WHERE parent_id = $parent_id";
$id = $fila['student_id'];
$nombre = $fila['name'];
}
//AHORA PUEDES OCUPAR LAS VARIABLES PARA IMPRIMIRLAS DONDE QUIERAS O ASIGNARLAS A OTRAS VARIABLES
echo $nombre." ";
echo $id;
$otra_variable = $nombre;
echo $otra_variable;
saludos!