OK - I have managed to to this with underscores. It will look ugly on the bank statements but will work.
I have a question; Is there any reason why the str_pad() would put 1 padding too little?
I have this code
echo '5680',str_pad($dni, 12, "0", STR_PAD_RIGHT),str_pad($id, 12, "0", STR_PAD_LEFT),str_pad($nombre, 40, "_", STR_PAD_BOTH),$cuenta,str_pad($importe, 10, "0", STR_PAD_LEFT),'________________',str_pad($concepto, 40, "_", STR_PAD_LEFT),'________';
echo "<br>";
And it works perfeclty every singly time except for my 78th and 92nd entry. There is nothing similar between these two entries.
It is this part the goes wrong; ,str_pad($nombre, 40, "_", STR_PAD_BOTH), It puts 39 characters instead of 40.
Bizzare huh?