Ver Mensaje Individual
  #2 (permalink)  
Antiguo 28/07/2011, 09:13
Avatar de Eleazan
Eleazan
 
Fecha de Ingreso: abril-2008
Ubicación: Ibiza
Mensajes: 1.879
Antigüedad: 16 años
Puntos: 326
Respuesta: problema con clase array_search

Código PHP:
public function abrirArchivo(){
    
$archivo file_get_contents(self::getPath());
    
$datos explode('\n',$archivo);
    return 
$datos;
}
public function 
buscarArchivo($tipo){
    
$puntero 0;
    
$arreglo self::abrirArchivo();
    switch (
$tipo){
        case 
"#POINT":
            
$indice=array_search($tipo$arreglo);
        break;
    }
    return 
$indice;

Si lo pones entre las etiquetas [ php] y [ /php] se hace más legible! ;)

¿Te funciona bien la función de abrirArchivo() ?