title: Array - Check if array doesn't pick same value twice
body: <p>I'm working on a script which rotates multiple slogans from an array. It picks a random array item and displays it, like so:</p>
  
  <pre><code>function sloganrotator_sc() {
      global $sloganrotator_options;
  
      $sentences = $sloganrotator_options['slogans'];
      $array = explode("\n", $sentences);
  
      if (count($array) &gt; 1) {
          $randomize = array_rand($array);
          $result = $array[$randomize];
  
          return $result;
      } else {
          return $sloganrotator_options['slogans'];
      }
  }
  add_shortcode( 'slogan-rotator', 'sloganrotator_sc' );
  </code></pre>
  
  <p>What I'm trying to archieve is to check if the value on page 1 is not the same as on page 2.</p>
  
  <p>For example: Before the page refresh, the value was 'Hello', after the refresh the value is 'Dogs'. I want to check if it doesn't pick the same item twice.</p>
  
  <p>Something like this:</p>
  
  <pre><code>if($array[$randomize] == $result) {
      return 'Hold on, this one has already been shown!';
  }
  </code></pre>
  
  <p>Sorry for my bad explanation, it's hard to explain..</p>