Ver Mensaje Individual
  #4 (permalink)  
Antiguo 11/08/2013, 20:24
Javieer
 
Fecha de Ingreso: agosto-2013
Mensajes: 8
Antigüedad: 10 años, 8 meses
Puntos: 3
Respuesta: Filtrar array según contenido "parcial" de valores

Código PHP:
Ver original
  1. <?php
  2. function cb($v)
  3.     {
  4.     return !preg_match("/g/", $v);
  5.     }
  6.  
  7. $data = array(12, "f", 21, "g", 43.96, "php","el gato");  
  8. array_filter($data, "cb");
  9. ?>