[eluser]pbreit[/eluser]
Curious what the board thinks of using if/then/else shorthand (aka ternary or conditional operator).
For example, I was looking at some Ion Auth code:
Code:
if ($this->input->post('remember') == 1) {
$remember = true;
}
else {
$remember = false;
}
Would anyone prefer this?
Code:
$remember = ($this->input->post('remember') == 1 ? TRUE : FALSE );
Or:
Code:
$remember = FALSE;
if ($this->input->post('remember') == 1)
{
$remember = true;
}