philipp: Parser für css-Dateien

Beitrag lesen

hi du!

es geht aber leider immer noch nicht, bzw. findeste er nix:

<?
if ($url) {
 $ar = file($url);
 $ps = "";
 $selektoren = "";
 $as = "";
 for($i=0; $i<count($ar); $i++)
 { $ps .= $ar[$i];
     if(strstr($ps, "{") && strstr($ps, "}") && substr_count($ps, "{")==substr_count($ps, "}"))

{ $ar2 = explode("}", $ps);
     for($j=0; $j<count($ar2); $j++)
     {
         if(strstr($ar2[$j], "{"))

{ $ar3 = explode("{", $ar2[$j]);
         $selektoren[$as] = trim($ar3[0]);
         $ar3++;
       }
     }

$ps = "";

}
 }
 for($i=0; $i<count($selektoren); $i++) {
 echo "<b>".$selektoren[$i]."</b><br>"; }

}

?>

online unter [http://cologne1.center-tag.de/style.php3]

woran kann es liegen? gruss philipp