Msg#: 4475411 posted 10:04 am on Jul 16, 2012 (gmt 0)
Switch/Case ignores conditions once one of them has been met (or at least it does in the C programming language). It executes all commands until 'break' is found, even if the next condition is not met.
Once $interval>0 is found, all the code in the block is run. This is why it is adding all the titles.