title: Delete a value from Php Comma seperated value array saved in MySQL
body: <p>I have a script which works great for saving users in comma seperated value to MySQL 'reserve' field.</p>
  
  <p>eg '510,465,8552'</p>
  
  <p>I then have the script below which echos the users name from the comma seperated 'reserve' field.
  The bit i am struggling with is to be able to click on a delete image next to one of the users and it will delete the users id from the comma seperated value.</p>
  
  <pre><code>    $entries = get_records_sql ("SELECT * FROM development ORDER BY pdorder ASC");  
      foreach($entries as $lesson) {
  
      $waiting = explode(",", $lesson-&gt;reserve);
      foreach($waiting as $unlucky) {
      $reserveuser = get_record("user", "id", $unlucky);
  
      if($reserveuser-&gt;id&gt;1){
  echo '&lt;li id="lstno'.$lesson-&gt;id.'" name="'.$reserveuser-&gt;id.'"&gt;'.$reserveuser-&gt;firstname.'&amp;nbsp;'.$reserveuser-&gt;lastname.' ';
  echo '&lt;a href="removereserve.php?id='.$lesson-&gt;id.'&amp;reserve='.$reserveuser-&gt;id.'"&gt;&lt;img title="unenrol" src="delete.gif" /&gt;&lt;/a&gt;';
          echo '&lt;/li&gt;';
          }
      }
  </code></pre>
  
  <p>Any guidance would be much appreciated, thanks in advance.</p>