title: using in_array/php card dealer program
body: <p>This has me stumped.  Basically I am trying to deal cards.  I get the right number of cards but it duplicates the card it randomly generates. Instead I need to have 52 different cards if the user inputs 52.</p>
  
  <p>Ive been up and down trying to do this but cant figure it out.  I tried using the in_array function but to no avail</p>
  
  <p>Can someone help please</p>
  
  <pre><code>&lt;?php
  $input = $_POST["txtNumberOfCards"];
  
  $suit = array("Hearts", "Diamonds", "Clubs", "Spades");
  $card = array("Ace","2", "3","4","5","6","7","8","9","10","Jack","Queen","King");
  
  $randsuit = rand(0,3);
  $randcard = rand(0,12);
  
  for($x = 0; $x &lt; $input; $x++){
  echo ('&lt;img src="Images/'.$card[$randcard].'of'.$suit[$randsuit].'.gif"&gt;');
  }
  
  ?&gt;
  </code></pre>