Ever wandered which one is correct? if($var ==5) or if (5==$var)? Why? Although, you might see a warning in your IDE, it’s unlikely you will get any error for saying if($var = 5) , but if you have a habit of using the other way, you will get an error for assigning variable to constant. <?php What you use if($var == 5){} What you should use if(5==$var){} Why you should follow me ...
There’s a better way for if($var == 5). It’s ..
T