Tag Archives: if-else

PHP Ternary Operator (if-else shortCode)

php-ternary-operators

The ternary operator a shortcut comparison operator that replaces an if-else statement. This can be implemented to reduce number of lines and time costs in your projects if you need to use a lot of comparison operators. The ternary operator is really very simple so use, but it might confuse newbie PHP programmers. Continue

Bracketless VS traditional if-else statement

concatenating-php-strings

There is no secret that some developers are using traditional statements, some – bracket-less. But witch one is better to use?
I’ve dived directly into testing. Continue