Ver Mensaje Individual
  #2 (permalink)  
Antiguo 25/10/2009, 18:18
Avatar de luckystrikede11
luckystrikede11
 
Fecha de Ingreso: octubre-2009
Ubicación: Concepcion, Chile
Mensajes: 240
Antigüedad: 15 años, 3 meses
Puntos: 17
Respuesta: crear variable de un array

Código PHP:

function llamada_ruta ($valor) {
    
$lineas file ('una pagina cualquiera'); // AQUI PONGO LA URL DE LA PAGINA
    
foreach ($lineas as $linea_num => $linea) {
        
$linea_final = array(
        
$linea_num => htmlspecialchars($linea) ); // AQUI ME DA EL ARRAY DEL HTML CON LA LINEA QUE LE HABIA DADO EN LA VARIALBE $VALOR

        
$file $linea_final[$valor]; //cargamos el string
        
$partes explode("thumbsDir"$file); // cortamos el string
        
$file2 $partes[1]; // da como salida el texto cortado
        
$final explode("'"$file2); // cortamos el string resultatnde por el final

        
echo $final[0]; // Y ESTE ARRAY ES EL QUE QUIERO QUE SE ALMACENE EN UNA VARIABLE O PODER HACER UN RETURN DE ALGUNA FORMA

    
}
    return 
$final[0];
}


$variable llamada_ruta ($valor); 
o yo te entendi mal o lo explicaste de mal forma

pues lo unico que habia que hacer es agregar el return