here is the code
print_r(array_values($resultfaceoffs));
if (in_array("0", $resultfaceoffs[opponent_id]))
{
echo "<br><br>yes";
}
else
{
echo "<br><br>no";
}
the array:
Array
(
[0] => Array
(
[0] => 1
[faceoff_id] => 1
[1] => 0
[player_id] => 0
[2] => 0
[opponent_id] => 0
[3] => 1
[races] => 1
)
[1] => Array
(
[0] => 2
[faceoff_id] => 2
[1] => 0
[player_id] => 0
[2] => 0
[opponent_id] => 0
[3] => 1
[races] => 1
)
[2] => Array
(
[0] => 3
[faceoff_id] => 3
[1] => 0
[player_id] => 0
[2] => 0
[opponent_id] => 0
[3] => 1
[races] => 1
)
[3] => Array
(
[0] => 4
[faceoff_id] => 4
[1] => 0
[player_id] => 0
[2] => 0
[opponent_id] => 0
[3] => 1
[races] => 1
)
)
<br><br>no
i cant seem to find the 0 or "0" in the array, probably because i am not searching on the right array, what am i doing wrong?