CakePHP: Ternary condition
Kalau selalu guna if and else, langkah seterusnya mesti tahu ternary condition. ade alternative lain nak guna dalam CakePHP, contoh: /* ife in cakePHP */ ife($condition, $true, $false) jadi, kalau statement ternary tu cam ni: /* ternary condition */ echo ($x)?’x = true’:'x = false’; ble ubah jadi macma ni. mudah sket /* replace ternary [...]