diotalevi: You weren't nesting your ternaries.
A little trick I like to use is to avoid putting a nested trenary the 'then' part.
I had a little difficulty deciphering your desired result, but here's the general idea.
$result = ($major_length == 4800) ? 18 : ($major_length != 8552) ? 0 : ($val == 4) ? 33 : ($val == 1) ? 18 : 0;
In reply to Re: nested tabular ternary
by nedals
in thread nested tabular ternary
by bowei_99
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |