Script zum Löschen von doppelten Zeilen Beispiel Quelle
Script zum Löschen von doppelten Zeilen Beispiel Quelle
Diese Funktion entfernt alle doppelten Einträge (first Level) aus einem Array. function remove_duplicated_values($arr){ $_a = array(); while(list($key,$val) = each($arr)){ $_a[$val] = 1; } return array_keys($_a); } [/php] Die Funktion entfernt alle Keys! Quelle: jonasjohn.de
Eine Routine zum Entfernen doppelter Zeilen /** * RemoveDuplicatedLines * This function removes all duplicated lines of the given text file. * * @param string * @param bool * @return string */ function RemoveDuplicatedLines($Filepath, $IgnoreCase=false, $NewLine=“n“){ if (!file_exists($Filepath)){ $ErrorMsg = ‚RemoveDuplicatedLines error: ‚; $ErrorMsg .= ‚The given file ‚ . $Filepath . ‚ does not […]