dovrebbe aggiungere una stringa vuota a $txtout, comunque... prova, no?