php shorthand if adalah cara untuk mempersingkat fungsi if else di php
bentuknya seperti ini (condition) ? (true return value) : (false return value)
contoh
<?php $var = 5; ($var > 2 ? true : false); // returns true ?>
referensi:
http://davidwalsh.name/php-shorthand-if-else-ternary-operators
semoga berguna 🙂
tinggalkan pesan