Use the PHP wordwrap() function.
SG Edwards wrote:
> Hi guys,
>
> I have a postgres database connected to a website using PHP.
> I have a table that stores gene sequences which are very long (approx. 800
> characters).
>
> If I try and print this, it prints as a single line which runs off the page. Is
> there a way to print the sequence with a line break every 50 characters?
>
> for example,
>
> AAAAAAAAAAAACCCCCCCCCCC
> TTTTTTTTTTTTTTTTGGGGGGG
> AAAAAAAAATTT
>
>
> Rather than:
>
> AAAAAAAAAAACCCCCCCCCCCCTTTTTTTTTTTTTGGGGGGGGGGGAAAAAAAAAATTT
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org