title: Php associative array deleting a value on click
body: <p>I'm a newbie and I'm learning PHP so any help would be greatly appreciated.</p>
  
  <p>I've been struggling a whole day with this
  I have an array that represents user last actions and it just records
  day - time - "type of action"  (and it's serialized and sent to mySQL DB.)</p>
  
  <p>And I'm getting array like this:</p>
  
  <p>---- EDITED ----</p>
  
  <pre>
  Array ( [0] => Array ( [Date] => 2011-02-06 [Time] => 06:48 PM [Entry] => Email sent 0 test ) [1] => Array ( [Date] => 2011-02-06 [Time] => 06:48 PM [Entry] => Email sent 1 test ) [2] => Array ( [Date] => 2011-02-06 [Time] => 06:48 PM [Entry] => Email sent 2 test ) ) 
  </pre>
  
  <p><strong>And my question is, I want to add a small button/link in each row (when array is displayed) so that user can remove just that particular action</strong> </p>
  
  <pre>
  foreach ( $actionhistory as $row ) {
    foreach ( $row as $key => $value ) {
     echo "<a href="http://foo.com" rel="nofollow">foo delete record</a> - $value";
    }
    echo '<br />';
  }
  </pre>
  
  <p>Question:
  user now sees this in his browser:</p>
  
  <pre>
  2011-02-0606:48 PM Email sent 0 test
  2011-02-0606:48 PM Email sent 1 test
  2011-02-0606:48 PME mail sent 2 test
  </pre>
  
  <p>I want to add a link before each date. So when users clicks on that link - external page will be loaded and that particular "record" needs to be removed from the list.</p>
  
  <p>E.G. User wants to remove entry </p>
  
  <pre>
  [2] => Array ( [Date] => 2011-02-06 [Time] => 06:48 PM [Entry] => Email sent 2 test )
  </pre>
  
  <p>he will click on the link beside that entry.... and that's where I have a problem.
  How do I remove that entry but keeping the rest ?</p>