My array would only get a 0 or a 1. I'm using PDO statement for mysql, and this is what I have
$result = $fetching -> fetch();
$first_result = $result[0];
if($first_result === 0){
//do something...
}else{
echo "testing";
}
I'm always getting the testing no matter what, if its 0 or not. I've echoed out the $first_result[0] for testing purposes and it will tell me what the value is. So I know that the value will shoot out either 0 or not 0. But when it is 0, it still echos out testing.
Help please?
Thank you!