title: PHP in_array if only item
body: <p>I am using in_array to detect if a value is within a PHP array, my array looks like this...</p>
  
  <pre><code>$fruits = array("banana", "grape", "orange", "apple");
  
  /* is grape in the array */
  if (in_array('grape', $fruits)) {
      echo 'Grape Detected';
  } else {
      echo 'Grape not detected';
  }
  </code></pre>
  
  <p>I am trying to modify this so that it can also detect when the 'grape' is the only item in the array, so if the array looked like this...</p>
  
  <pre><code>$fruits = array("grape", "grape", "grape");
  </code></pre>
  
  <p>or...</p>
  
  <pre><code>$fruits = array("grape");
  </code></pre>
  
  <p>Then I could display a custom message, anyone have an example I can see?</p>