IT-Frank: Datum zerlegen

Beitrag lesen

Hey WauWau

Warum bekomme ich im ersten Script als Ausgabe

0324 0324 0324

obwohl dort doch folgendes drin steht

12 Jan 2000 IT Vorbereitungen
16 Jun 2000 IT Prüfung

???

<?php
$datei = file('messages');
$new = "";
foreach($datei as $line)
{
  $date = ""; $description = "";
  $exp = explode(" ",$line);
  foreach($exp as $index => $word) {
    if($index <= 31)
      $date .= " ".$word;
    else
      $description .= " ".$word;
  }
  $date = strtotime($date);
  $new .= date("md")." ".$description;
}
print $new;
?>