Ver Mensaje Individual
  #7 (permalink)  
Antiguo 23/02/2009, 22:35
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Respuesta: Saber si 4 numeros son iguales

Mmmm ... in_array?

Código php:
Ver original
  1. $numeros = array(2, 3, 2, 2, 2, 2, 2);
  2. $numero = 1;
  3. if( in_array( $numero, $numeros ) ) {
  4.       echo "hay iguales";
  5. } else {
  6.       echo "no hay iguales";
  7. }

Saludos