Brady Mitchell wrote:
Keep in mind that this is a bit more difficult read than the standard:

if($condition == false && $var == "foo")
{
    echo false
}
else
{
    echo "foo";
}

That's not what my code does at all. You might want to read over it again. Maybe that just reinforces your point about readability. :)

The code,

   $condition && $var = "foo";

simply assigns "foo" to $var if $condition evaluates to true.

It's exactly what Wade wanted, namely, using the '?' without the ':'

--Dave

_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to