Mailinglisten-Archive |
> OK, das habe ich jetzt, allerdings beise ich mir schon
> wieder die Zähne am auslesen aus :(( Man, heute läuft
> garnix. Bin wie vor den Kopf gestoßen! So hab ich es
> gemacht:
>
> while ($line = fgets($fp, 1000)) {
> $var = explode("||", $line);
> list($tag, $monat, $jahr) = split("\.", $var[2]);
> $datum = $jahr.$monat.$tag;
>
> $data = array(
> "$datum" => array("$var[0]", "$var[7]"));
> }
versuchs mal so:
while($line = fgets($fp, 1000)) {
$var = explode("||", $line);
list($tag, $monat, $jahr) = explode("\.", $var[2]);
$datum = $jaht.$monat.$tag;
$data[$datum] = array($var[0],$var[7]);
}
sort($data);
und dann
foreach($data as $key => $newArray) {
// $key = das datum
$output = $key." - ";
foreach($newArray as $key2 => $value) {
$output .= $value.",";
}
print $output;
?><br><?
$output = "";
}
so oder ähnlich.
-boris
php::bar PHP Wiki - Listenarchive