How can I make a unlink button in PHP
<p>I have a <strong>PHP script</strong> where you can upload files. These files get listed, and are converted to a download link. The last thing that I need is a delete button for each list item. Like so </p>

<ul>
<li>test.txt X</li>
</ul>

<p>(The large X should be a delete button).</p>

<p>This is my code so far.</p>

<pre><code>&lt;?php

  if(isset($_FILES['file_array'])){
    $name_array = $_FILES['file_array']['name'];
    $tmp_name_array = $_FILES['file_array']['tmp_name'];
    $type_array = $_FILES['file_array']['type'];
    $size_array = $_FILES['file_array']['size'];
    $error_array = $_FILES['file_array']['error'];
    for($i = 0; $i &lt; count($tmp_name_array); $i++){
        if(move_uploaded_file($tmp_name_array[$i], "uploads/".$name_array[$i])){
        } else {
            echo "move_uploaded_file function failed for ".$name_array[$i]."&lt;br&gt;";
        }
    }
  }


   $thelist = "";
   if ($handle = opendir('uploads')) {
       while (false !== ($file = readdir($handle))) {
           if ($file != "." &amp;&amp; $file != "..") {
              $thelist .= '&lt;li&gt;&lt;a download="'.$file.'"href="uploads/'.$file.'"&gt;'.$file.'&lt;/a&gt;&lt;/li&gt;';
           }
      }
    closedir($handle);
  }
?&gt;

&lt;h1&gt;List:&lt;/h1&gt;
&lt;ul&gt;&lt;?php echo $thelist; ?&gt;&lt;/ul&gt;
</code></pre>

<p>Im quite new with PHP, so I that hope someone can explain me how it works in easy language.</p>