You're viewing a single thread.
All Comments
111 comments
Finally got it...
$a == 1 ? "one" : ( ( $a == 2 ? "two" : $a == 3 ) ? "three" : "other" )
18 0 Replybecause "two" is a truthy value?
4 0 ReplyYep, any non empty string is truthy.
1 0 Reply
111 comments
Scroll to top