daniel-w
4/4/2016 - 4:19 PM

PHP Basic Ternary Statement

PHP Basic Ternary Statement

// if (get_field('year') == true) { echo get_field('year') } else { echo 'NA'; } 

<?php echo (get_field('year') ? get_field('year') : 'NA'); ?>