Einzelnen Beitrag anzeigen
  #18  
Alt 19.10.2004, 13:19:26
c4 c4 ist offline
SELFPHP Guru
 
Registriert seit: Jul 2002
Ort: Oberursel
Alter: 54
Beiträge: 4.748
Man speichert nie mehr in einer Datenbank, als notwendig. Normalisierung schimpft sich das.

Sieh Dir das mal an:
PHP-Code:
<?php
$f
=file('foo.txt');

for (
$i=0$i<count($f); $i++) {
    if (
strstr($f[$i], 'Total of')) {
        
preg_match_all("/Users of (.*):.*Total of (d*) licenses? issued;  Total of (d*) licenses? in use/isU"$f[$i], $temp);
        
$data[]=array('program' => $temp[1][0],
                      
'issued' => $temp[2][0],
                      
'used' => $temp[3][0]);
    }
}

print_r($data);

exit;
?>
__________________
sic!
--> http://dbCF.de/

Geändert von ­c­4­ (19.10.2004 um 13:27:14 Uhr)
Mit Zitat antworten