* @copyright 2018 Bartolomé Sintes Marco * @license http://www.gnu.org/licenses/agpl.txt AGPL 3 or later * @version 2018-10-31 * @link https://www.mclibre.org * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ // Se accede a la sesión session_name("cs-matrices-2-3"); session_start(); ?> Encuesta (Formulario). Matrices (2). Sesiones. Ejercicios. PHP. Bartolomé Sintes Marco. www.mclibre.org

Encuesta (Formulario)

Valore de 1 a $respuestas cada uno de estos aspectos.

\n"; ?>
\n"; print " \n"; // Bucle para generar la primera fila, las celdas sólo contienen números for ($j = 1; $j <= $respuestas; $j++) { print " \n"; } print " \n"; // Bucle para generar las siguientes filas for ($i = 1; $i <= $preguntas; $i++) { print " \n"; // La primera celda contiene el número de pregunta print " \n"; // Bucle para generar las celdas con los botones radio for ($j = 1; $j <= $respuestas; $j++) { // El nombre del control es una matriz (e[]) // En cada fila el name del control es el mismo (para que formen un botón radio) // pero el value va cambiando print " \n"; } print " \n"; } ?>
$j
Pregunta $i: