En php no puedes crear variables dinamicamente como estas intentando. En su lugar deberias crear un array como mencione
Código PHP:
Ver original$daticos[]=consultageneral("examen_general");
$daticos[]=consultageneral("examen_minas");
$daticos[]=consultageneral("examen_operador");
$daticos[]=consultageneral("examen_salud");
$i = 0;
$j = 0;
for ($j = 0; $j <= 4; $j++) {
$i = ($i) + 1;
echo "<tr>";
echo "<td><font color='#000'>" . $i . "</font></td>";
echo "<td><font color='#000'>" . $datos['Id'] . "</font></td>";
echo "<td><font color='#000'>" . $datos['nombre'] . "</font></td>";
echo "<td><font color='#000'>" . $datos['programa'] . "</font></td>";
echo "<td><font color='#000'>" . $datos['basicas'] . "</font></td>";
echo "<td><font color='#000'>" . $datos['ciudadanas'] . "</font></td>";
echo "<td><font color='#000'>" . $datos['generales'] . "</font></td>";
echo "<td><font color='#000'>" . $datos['nota'] . "</font></td>";
echo "</tr>";
}
}
Link a
Arrays en php.net