php check 2 variables if they are equal one to another and both equal to 0
equals, if-statement, php
Solution
Code should be
if (($getstatuschk == $getstatuspost) && ($getstatuspost == 0)){
echo "status is ok";
}
else {echo "not ok!"}
You don't need to check if both variables are equal to zero since you already compared them and don't put zero in quotes since this makes it a string
Problem
as the tile says, i have 2 variables that must be equal one to another and both equal to 0 i tried a few things but none worked: ``` if (($getstatuschk === $getstatuspost) && ($getstatuschk === "0") && ($getstatuspost === "0")){ echo "status is ok";} else {echo "not ok!"} if (($getstatuschk === $getstatuspost) and ($getstatuschk === "0") and ($getstatuspost === "0")){ echo "status is ok";} else {echo "not ok!"} ``` i hope you can help me whit this... thanks!