note 113830 added to function.get-cfg-var

From: Date: Fri, 06 Dec 2013 00:08:10 +0000
Subject: note 113830 added to function.get-cfg-var
Groups: php.notes 
Request: Send a blank email to php-notes+get-197786@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/113830 Del: integrated -- https://master.php.net/note/delete/113830/integrated Del: useless -- https://master.php.net/note/delete/113830/useless Del: bad code -- https://master.php.net/note/delete/113830/bad+code Del: spam -- https://master.php.net/note/delete/113830/spam Del: non-english -- https://master.php.net/note/delete/113830/non-english Del: in docs -- https://master.php.net/note/delete/113830/in+docs Del: other reasons-- https://master.php.net/note/delete/113830 Reject -- https://master.php.net/note/reject/113830 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#197786) next »