Original geschrieben von rcfman
Ich möchte doch nur das name und score ausgebländet wird.
Ich möchte doch nur das name und score ausgebländet wird.
http://www.duden.de/suche/index.php?...&bereich=mixed
<?php
$content=file_get_contents("Games/asteroids_scores.txt");
echo $content; // value
?>
<?php
$fp = explode("Games/asteroids_scores.txt","r");
if ($fp)
{
while(!feof($fp))
{
$text = fgets($fp);
echo"$text";
}
fclose($fp);
}
?>
EDIT:
...viel zu spät
<?php
$content=file_get_contents("Games/asteroids_scores.txt");
$content = str_replace("&name1", "", $content );
$content = str_replace("=", "", $content );
$content = str_replace("&name2", "<br>", $content );
$content = str_replace("&name3", "<br>", $content );
$content = str_replace("&name4", "<br>", $content );
$content = str_replace("&name5", "<br>", $content );
$content = str_replace("&name6", "<br>", $content );
$content = str_replace("&name7", "<br>", $content );
$content = str_replace("&name8", "<br>", $content );
$content = str_replace("&name9", "<br>", $content );
$content = str_replace("&name10", "<br>", $content );
$content = str_replace("&score1", " : ", $content );
$content = str_replace("&score2", " : ", $content );
$content = str_replace("&score3", " : ", $content );
$content = str_replace("&score4", " : ", $content );
$content = str_replace("&score5", " : ", $content );
$content = str_replace("&score6", " : ", $content );
$content = str_replace("&score7", " : ", $content );
$content = str_replace("&score8", " : ", $content );
$content = str_replace("&score9", " : ", $content );
$content = str_replace("&score10", " : ", $content );
echo substr($content,0,95) ;
?>
Kommentar