Ver Mensaje Individual
  #1 (permalink)  
Antiguo 16/05/2008, 15:33
Avatar de Elyeyo
Elyeyo
 
Fecha de Ingreso: mayo-2008
Mensajes: 22
Antigüedad: 16 años, 9 meses
Puntos: 0
problemas con array_diff

Hola tengo un problema.
Resulta que utilizo el array_diff pero parece que no hace lo que tiene que hacer.

Les muestro el código
Código PHP:
$path "/Inetpub/wwwroot/MRTG/CarArr.txt";
$pf fopen ($path,"r");
$archivo file($path); 
foreach(
$archivo as $i=>$linea) {

$en_pagina [++$i] = $linea;
print (
"<br> ".$i.".- ".$en_pagina [$i]." </br>");
}


$i 0;
$open=opendir ("/Inetpub/wwwroot/MRTG/");
while (
$folders=readdir($open))
    {
    
$filename="/Inetpub/wwwroot/MRTG/"$folders;
    if (
is_file($filename)== false && $folders!='.' && $folders!='..'  )
        {
        
$en_carpeta [++$i] = $folders;
        }
    }
$opciones array_diff ($en_carpeta$en_pagina);
For (
$i 1$i<22$i++)
    {
    print (
"<br> ".$i.".- ".$opciones [$i]." </br>");
    } 
Y los datos del archivo que está leyendo son los siguientes
Código:
ROUTER_JUEVES8_2
DIS_JUEVES8_2
Y la matriz que genera al leer las carpetas es la siguiente
Código:
 DIS_JUEVES8_1 

DIS_JUEVES8_2 

JUEVES24_4 

LUNES5_2 

LUNES5_3 

LUNES5_4 

LUNES5_5 

LUNES5_6 

LUNES5_7 

LUNES_MIMAQ 

MIERCOLES1 

MIERCOLES30_2 

MIERCOLES30_3 

MIERCOLES30_5 

Prue 

ROUTER_JUEVES8_1 

ROUTER_JUEVES8_2 

ROUTER_LUNES12_1 

ROUTER_LUNES12_2 

ROUTER_VIERNES9_1 

ROUTER_VIERNES9_2
De antemano muchas gracias.