{% else-1 %}
Wins * 5.64
(30 апр 2016, 09:19) (1/0) [1]
Не успел наговнокодить)

<?php

$file = './file.txt'; // Путь к файлу

$ofile = file($file, FILE_IGNORE_NEW_LINES);

$text = NULL;

foreach($ofile AS $str) {

$search = explode('_', $str);
if(strripos($text, $search[0] .'_') === false) $text .= $str . PHP_EOL;

}

file_put_contents($file, trim($text));

?>
  • 1 из 1