Quote Originally Posted by torvista View Post
in the code there is this:


I don't get the logic behind the second case (true):
or rather don't find a similar construct on the web to explain its use here....
So, unfortunately the code segment didn't carry over to this post (quoted text maybe?), but at the time of development/incorporation, the thought was: there was no need for $out_of_stock to be defined if there was stock. But, it would be needed for the cases beyond.
The select criteria is set to act on case statements that are true. Therefore if the first case is false the next case is evaluated. The second case evaluates to true by default and is processed. The absence of a break causes the third and subsequent cases to be evaluated until true with a break that follows or default is reached.

Further because the $out_of_stock variable made up part of the "if" structure, I was trying to keep it a part of the logic rather than either pulling it completely out to a separate statement or to repeat the code at each subsequent case. This way the processing logic would be fully contained to this dropdown structure rather than separate parts that would have to be maintained together.

Typical examples would show some part of each of these aspects which were grouped together to give this select structure.

So, besides the interest in its presence, what issue(s) are trying to be resolved?