Ver Mensaje Individual
  #3 (permalink)  
Antiguo 23/05/2013, 10:44
viringas
 
Fecha de Ingreso: marzo-2011
Mensajes: 226
Antigüedad: 13 años, 1 mes
Puntos: 1
Respuesta: detectar palabras mayusculas

cambie el codigo tal que asi

Código PHP:
Ver original
  1. $arrayTitulos = array();
  2.  
  3. $token = '';
  4. $j = 0;
  5. $arrayLinea = array();
  6.  
  7. while ( ($current_line = fgets($fich)) !== false ) {
  8.  
  9.     $arrayLinea = str_split($current_line);
  10.    
  11.     for ($i = 0; $i< count($arrayLinea); $i++){
  12.        
  13.         if ($arrayLinea[$i] == strtoupper($arrayLinea[$i]) ){
  14.  
  15.             if ($arrayLinea[$i+3] == strtoupper($arrayLinea[$i+3]) ){
  16.            
  17.                 $token = $current_line;
  18.                
  19.                 //echo($token);
  20.             }
  21.         }
  22.     }
  23.    
  24.     $arrayTitulos[$j] = $token;
  25.         $j++;
  26.         print_r($arrayTitulos);
  27. }


para la primera linea funciona, pero cuando le doy todo el texto (que es bastante grande), empieza a dar estos errores:

notice: undefined offset:

alguien puede ayudarme?