note 113829 added to function.get-cfg-var

From: Date: Fri, 06 Dec 2013 00:08:07 +0000
Subject: note 113829 added to function.get-cfg-var
Groups: php.notes 
Request: Send a blank email to php-notes+get-197785@lists.php.net to get a copy of this message
<?php session_start(); // Necesario para trabajar con variables de sesión function crear_matriz($filas, $columnas) { $x = array(); for ($i = 0; $i < $filas; $i++) { for ($j = 0; $j < $columnas; $j++) { $x[$i][$j] = rand(1, 10); } } return $x; } // $matriz = crear_matriz(); $matriz = crear_matriz($_POST["f"], $_POST["c"]); // Creamos la matriz según las filas y columnas recibidas del formulario ?> <html> <head> <title>Página 1</title> </head> <body> <table border="1"> <?php foreach($matriz as $fila) { print "<tr>"; foreach($fila as $celda) { print "<td>" . $celda . "</td>"; } print "</tr>"; } ?> </table> <a href="pagina2.php">Página 2</a> </body> </html> <?php // No hay que olvidar crear las variables de sesión $_SESSION["matriz"] = $matriz; // para la matriz $_SESSION["numero1"] = $_POST["x"]; // para el primer número $_SESSION["numero2"] = $_POST["y"]; // para el segundo número ?> ---- Server IP: 72.52.91.14 Probable Submitter: 72.52.91.14 ---- Manual Page -- http://php.net/manual/en/function.get-cfg-var.php Edit -- https://master.php.net/note/edit/113829 Del: integrated -- https://master.php.net/note/delete/113829/integrated Del: useless -- https://master.php.net/note/delete/113829/useless Del: bad code -- https://master.php.net/note/delete/113829/bad+code Del: spam -- https://master.php.net/note/delete/113829/spam Del: non-english -- https://master.php.net/note/delete/113829/non-english Del: in docs -- https://master.php.net/note/delete/113829/in+docs Del: other reasons-- https://master.php.net/note/delete/113829 Reject -- https://master.php.net/note/reject/113829 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#197785) next »