witam nie umiem sobie poradzić z tym skryptem chciał bym też zeby ktoś mi powiedział jak zrobić aby sortowało wg dat od najnowszej do najstarszej o to ten skrypt.
Cytat
<?php
$file = "D:\\thgfdhg\\data\\logs\\reports.xml";
$f = @fopen($file, "r");
$contents = fread($f, filesize($file));
$tags = explode("<", $contents);
$found = 0;
foreach($tags as $tag){
if(substr($tag, 0, 6) == "report") {
if($temppos = stristr($tag, "name=\"")) {
$temp = explode("\"", $temppos);
$name = $temp[1];
$found = 1;
}
if($temppos = stristr($tag, "reason=\"")) {
$temp = explode("\"", $temppos);
$reason = $temp[1];
$found = 1;
}
if($temppos = stristr($tag, "time=\"")) {
$temp = explode("\"", $temppos);
$time = $temp[1];
$found = 1;
}
print("[$time] - $name $date was banished because of $reason.<br>");
}
}
?>
wiem ze post był pisany 4 lata temu ale nie chce zakładać nowego tematu a chciał bym uzyskać szybko informacji jak to zrobić albo poczekać aż ktoś to zrobi. Proszę o pomoc.