Welcome Guest, Not a member yet? Register   Sign In
If, then, else shorthand (aka ternary or conditional operator)?
#2

[eluser]richthegeek[/eluser]
All of them are too verbose - the input::post() method returns a boolean "false" if the item is not set (as is the case with unticked checkboxes).

As such, remember can just be something like the following (although the casting is unrequired)
Code:
$remember = (bool) $this->input->post('remember');


Messages In This Thread
If, then, else shorthand (aka ternary or conditional operator)? - by El Forum - 10-20-2010, 06:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB