Ver Mensaje Individual
  #9 (permalink)  
Antiguo 20/06/2011, 21:22
Avatar de masterpuppet
masterpuppet
Software Craftsman
 
Fecha de Ingreso: enero-2008
Ubicación: Montevideo, Uruguay
Mensajes: 3.550
Antigüedad: 16 años, 3 meses
Puntos: 845
Respuesta: Foreach Unset no funciona!

Con algo así debería funcionar:

Código PHP:
Ver original
  1. foreach ($alumno as $key => $item) {
  2.     if ($item == chr(13)) {
  3.         unset ($alumno[$key]);
  4.     }
  5. }

lo mismo pero con array_filter(para PHP 5.3+, podes utilizar create_function para PHP 5.3-)

Código PHP:
Ver original
  1. $arr = array_filter($alumno, function($el) {
  2.         return ord($el) != 13;
  3. });
__________________
http://es.phptherightway.com/
thats us riders :)