Re: Printing off the page.... - Mailing list pgsql-php

From David Blanco
Subject Re: Printing off the page....
Date
Msg-id ef2a8951050513044942a5251a@mail.gmail.com
Whole thread Raw
In response to Printing off the page....  (SG Edwards <s0460205@sms.ed.ac.uk>)
List pgsql-php
Hi!

2005/5/13, SG Edwards <s0460205@sms.ed.ac.uk>:
>
> 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?

This seems to be a PHP question, not about PHP-Posgresql :-)

If I understood you right, you can do it with the PHP function "substr"

http://php.net/substr

It's easy to iterate throug the string and to intercalate the line
breaks wherever you want

Bye

pgsql-php by date:

Previous
From: SG Edwards
Date:
Subject: Printing off the page....
Next
From: Volkan YAZICI
Date:
Subject: Re: Printing off the page....