![]() Remove Duplicate Linesby bill - 2025-03-08 12:42:33 ( in education, tech, computers, software) [php version] rebuildI 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 Linesif (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 ""; } ?>
similar posts here ... and elsewhere
Comments (We enjoy free speech. Try not to offend, but feel free to be offended.)Leave your own comment: |
