I want to determine if each entry(string) in $array ends with a newline, and if not, add one...so, the following is in a FOR loop:
$linecheck=substr($array[$n], -1);
if (linecheck!="\n") { $array[$n] ="$array[$n]" . "\n";
Not only does this feel like a horrible kludge, it just doesn't work...I've grepped several pages of old posts here, but nothing yet...
any suggestions?
dalecosp
PS I've tried -2 in 'substr'...
I've tried "\015" instead of "\n" in IF