Tema
:
pregunta sobre switch en php, como hacer un case de varias opciones
Ver Mensaje Individual
#
6
(
permalink
)
21/11/2009, 08:29
DooBie
Fecha de Ingreso: septiembre-2004
Mensajes: 1.101
Antigüedad: 20 años, 4 meses
Puntos: 71
Respuesta: pregunta sobre switch en php, como hacer un case de varias opciones
Cita:
Iniciado por
urameshix
Prueba así:
Código PHP:
switch (
$i
) {
case
0
:
case
1
:
case
2
:
echo
"0-2"
;
break;
case
3
:
echo
"3"
;
break;
}
Un saludo
Esta es la solución. No hace falta hacer un if
DooBie
Ver Perfil
¡Visita mi Sitio!
Buscar todos los Mensajes de DooBie