ejemplo:
if:
Código PHP:
<?
if(empty($_GET['seccion'])) {
include("sec/principal.php");
} else {
if(file_exists("sec/".$_GET['seccion'].".php")) {
include("sec/".basename($_GET['seccion']).".php");
} else {
echo '<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=85%><b>Error 404</b><br><br>No se encuentra el archivo, intentelo de nuevo o Pruebe mas tarde </b></td>
</tr>
</table>';
}
}
?>
switch:
Código PHP:
<?php
switch ($_GET["id"]) {
case 'descargas':
include ("web/descargas/descargas.php");
break;
default:
include ("main.php");
break;
}
?>
saludos
![de acuerdo](http://static.forosdelweb.com/fdwtheme/images/smilies/dedosarriba.png)