Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Remode duplicate lines</title>
- <style>
- *{
- margin:0;
- padding: 0;
- box-sizing: border-box;
- }
- body{
- background: #cecece;
- display: grid;
- justify-content: center;
- text-align: center;
- }
- </style>
- </head>
- <body>
- <div>
- <h1>Remove duplicate lines</h1>
- <p>Code:Paulo Takaracha</p>
- <!--
- 02-09-2020
- Deus e bm diabo nao presta
- -->
- </div>
- <div>
- <form action="" method="post">
- <div>
- <textarea name="list" id="" cols="80" rows="10"></textarea>
- </div>
- <div>
- </div>
- <div>
- <input type="submit" name="btn">
- </div>
- </form>
- </div>
- <?php
- error_reporting(0);
- set_time_limit(0);
- if(isset($_POST['btn'])){
- $x=$_POST['list'];
- if($x!=''){
- extract($_POST);
- $lines = explode(PHP_EOL, $list);
- $result = array_unique($lines);
- $y = count($result);
- foreach ($result as $_lines) {
- echo "<br>";
- echo $_lines;
- }
- }else{
- echo "Lista vasia!.";
- }
- }
- ?>
- </body>
- </html>
Add Comment
Please, Sign In to add comment