title: PHP: How to remove specific element from an array?
body: <p>How do I remove an element from an array when I know the element's value? for example:</p>
  <p>I have an array:</p>
  <pre><code>$array = array('apple', 'orange', 'strawberry', 'blueberry', 'kiwi');
  </code></pre>
  <p>the user enters <code>strawberry</code></p>
  <p><code>strawberry</code> is removed from <code>$array</code>.</p>
  <p>To fully explain:</p>
  <p>I have a database that stores a list of items separated by a comma. The code pulls in the list based on a user choice where that choice is located. So, if they choose strawberry they code pulls in every entry were strawberry is located then converts that to an array using split(). I want to them remove the user chosen items, for this example strawberry, from the array.</p>