Dann versuch das mal:
greetz
daddz
PHP:
$datei = "file.txt";
$file = file($datei);
foreach($file as $element) {
foreach(explode("|", $element) as $key => $element2) {
if($key == 0) {
$desc[] = $element2;
}
else {
$cont[] = $element2;
}
}
}
$key_count = count($desc);
$value_count = count($cont);
$keys = array_values($desc);
$values = array_values($cont);
$daten = array();
for ($i = 0; $i < $key_count; $i++) {
$daten[$keys[$i]] = $values[$i];
}
echo $daten['uptime'];
greetz
daddz