Well,
First of all, when in a switch() statement, you should enclose actions in { .. }, i.e.
--
switch ($s) {
case 1: { print "ONE!"; break; }
default: { print 'DEFAULT'; break; }
}
Now, that set aside, I modified your code a little bit, and put echo("'$s' <br>"); in the 'default', instead of echo("$s ");. This gave me each word on a single line, and the word enclosed by ''. Look at a portion of it;
--
'(6:37).'
' Total'
'Networth:'
That is, the string returned from the split is ' Total' instead of 'Total'. If you remove the leading and trailing spaces using the trim() function, it works perfectly. (i.e. $s = trim($s)😉.
🙂