Ver Mensaje Individual
  #5 (permalink)  
Antiguo 18/11/2015, 01:50
Amiancht
 
Fecha de Ingreso: mayo-2013
Mensajes: 169
Antigüedad: 10 años, 11 meses
Puntos: 25
Respuesta: Como redirigir a distintos enlaces desde un mismo php

Cita:
Iniciado por pateketrueke Ver Mensaje
Podrías usar un array para almacenar todos los enlaces:
Código PHP:
Ver original
  1. $links = [
  2.   0 => 'http://google.com',
  3.   1 => 'http://yahoo.com',
  4.   // etc.
  5. ];
  6.  
  7. $id = (int) $_GET['id'];
  8.  
  9. echo $links[$id];
Me gusta tu código. Y tu nueva manera de filtrar los conocimientos de los usuarios, muy sutil.