1 2 3 4 5 6 7
<?php $value = 'hoge'; $result = $value == 'hoge' ? 10 : $value == 'fuga' ? 20 : -1; print $result;
1
20