I combined two arrays to create the following array, named $group_wages_array:
Array ( [1] => 500 [4] => 44 [6] => 80 [3] => 11.25 )
I am trying to test if the array key matches X, set a variable as it's value. Here's what I have:
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.
$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?
}
So, how do I get $this_wages to equal the key value?
$thegroup['group_id']
to an int. – BoltClock♦ Oct 12 '11 at 21:38$outer[$inner[1]]
, so$group_wages_array[$thegroup['group_id']]
. – Marc B Oct 12 '11 at 21:46