A web developer's blog. PHP, MySQL, CakePHP, Zend Framework, Wordpress, Code Igniter, Django, Python, CSS, Javascript, jQuery, Knockout.js, and other web development topics.

Tag Archives: ternary operator

PHP: Ternary Operator

This is one my favorites. Sometimes I use this when I come around “short” conditions in variable assignments. Instead of writing something like this: if (isset($myvar)) { $temp = $myvar; } else { $temp = ""; //i need to set … Continue reading

Posted in General | Tagged , | 2 Comments