I created this because I needed it regularly, and thought I'd share. Click here to run it, and look below to make one for yourself:
Remove Duplicate Lines
if (isset($_POST['submit'])) {
$inputText = $_POST['inputText'];
$lines = explode("\n", $inputText); // Split the input into lines
$uniqueLines = array_unique($lines); // Remove duplicates
$resultText = implode("\n", $uniqueLines); // Join lines back together
echo "
Result:
";echo "";
}
?>
