title: PHP If array_key_exists, variable equals array value: How?
body: <p>I combined two arrays to create the following array, named <strong>$group_wages_array</strong>:</p>
  
  <pre><code>Array ( [1] =&gt; 500 [4] =&gt; 44 [6] =&gt; 80 [3] =&gt; 11.25 )
  </code></pre>
  
  <p>I am trying to test if the array key matches X, set a variable as it's value. Here's what I have:</p>
  
  <p>NOTE: This whole thing is executed in a while loop, so the value of $thegroup['group_id'] will change. I've set it's value as "6" for this example.</p>
  
  <pre><code>$thegroup['group_id'] = "6" // This particular group (for simplicity)
  
  if (array_key_exists($thegroup['group_id'], $group_wages_array)) {
  
      $this_wages = // Need this to be 80... how do I do it?
  
  }
  </code></pre>
  
  <p>So, how do I get $this_wages to equal the key value?</p>