I run a loop and put some lines into a var.
$count = $n;
while($count > 0){
$List .= $var[$n]."<br>";
$count = $count - 1;
}
echo $List;
So I get something like this:
Line 1 asdasdasd
Line 2 sdasd asdasda
Line 4 sSASASAS
Line 6 asdasdasd
Now, I'd like to strip the blank lines. I tried doing:
$List = preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $List);
}
But it still outputs the blank lines... Any suggestions?
😕