I'm using in_array to see if $appid is contained in the variable $r. Here is my print_r of the array $r (the appids in the array are always changing):
$array = array(0 =>
array(0 => 356050, 'appid' => 356050),
1 => array(0 => 338040, ' appid' => 338040),
2 => array(0 => 263920, 'appid' => 263920),
3 => array(0 => 411740, 'appid' => 411740)
);
$appid is equal 263920 which is contained in $r array, yet despite the criteria being met 'it works' is not being echoed. Any help would be appreciated as I don't understand what's flawed about my php statement.
if (in_array($appid, $r)) {
echo 'it works'; // criteria met
}