Andreas Vogt: mehrdimensionales Array auslesen

Beitrag lesen

Hallo,
ja, ist jetzt klar ;-)

Jetzt hab ich diese Funktion zum Befüllen:

function getBlocks(){
global $nklib;
if (!$this->cache_blocks) {
$blockdir = "./blocks/";
if ($dirhandle = opendir($blockdir)) {
$i = 0;
while (false !== ($file = readdir($dirhandle))) {
$ext = substr(strrchr($file, "."), 1);
if ($ext == "tpl") {
$title = str_replace (".tpl", "", $file);
$this->cache_blocks[$i]['filename'] = $file;
$this->cache_blocks[$i]['title'] = $title;
$this->cache_blocks[$i]['content'] = file_get_contents($blockdir.$file);
$ex = explode("-->", file_get_contents($blockdir.$file));
$this->cache_blocks[$i]['direction'] = substr($ex[0],4);
$i++;
}
}
closedir($dirhandle);
    }
}
}

print_r() zeigt jetzt auch dass das Array korrekt angelegt wurde.
Aber wie lese ich das jetzt wieder aus?

Gruß Andreas