if문의 2가지

그냥 잘 잊어 버려서 ㅋㅋ

if($a=='1') {
  echo "aa";
}else{
  echo "bb";
}

이것을

$a == '1' ? 'aa' : 'bb';

같다

Press ESC to close