|
php test switch case |
Wednesday, January 31, 2007 |
CODE::CódigoPHP: <html> <head> <title>WebModular</title> <metahttp-equiv="Content-Type"content="text/html;charset=iso-8859-1"> </head>
<body> <tablewidth="100%"border="0"cellpadding="5"> <tr> <tdcolspan="2">CabeceradenuestraWeb</td> </tr> <tr> <td><ahref="index.php?id=1">Secci?n1</a><br> <ahref="index.php?id=2">Seccion2</a></td> <td> <? $id=$_GET['id'];
switch($id){ case1: include("pagina1.php"); break; case2: include("pagina2.php"); break; case3: include("pagina3.php"); break; default: include("pagina_por_defecto.php"); //estadodefault..nosdeterminaelestado //"sinoesningunaopciondelasanteriores". } ?> </td> </tr> <tr> <tdcolspan="2">Piedep?gina</td> </tr> </table> </body> </html> |
Tags: php test switch case |
|
|
|
|
Previous Post |
|
Archives |
|
Links |
|
Powered by |
|
|