You could make sure that your last array element always ends with a newline before processing it, to use your existing code:
$arr[-1] .= "\n";
In reply to Re: Flip-flop reset?
by Dietz
in thread Flip-flop reset?
by swkronenfeld
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |