php one line if without else

Solutions on MaxInterview for php one line if without else by the best coders in the world

showing results for - "php one line if without else"
Martina
29 Jan 2017
1$result = ($data->status == 1) ? 'active' : 'disable'
Raphaël
08 Apr 2017
1$thisVar != $thatVar ?: doThis();
2or
3($thisVar == $thatVar) && doThis();
4or
5if ($thisVar == $thatVar) doThis();