Php Tips

You can write less code for same result and It is more understandable.


$var = $var + 1; // Add 1 to $var
$var ++; // Gives same result


Also work with this;

$var = $var - 1; // Sub 1 to $var
$var --; // Gives same result



$var = "It"
$var = $var + " can be..."; // Result : It can be...
$var .= " can be..."; // Result : It can be...


Shortcut for If Else;

if($var != "page"){
$out ++; // Add 1 to $out
}

if($var != "page") $out ++; // Gives same result (Add 1 to $out)


Much more is coming soon. (: