Re: Printing off the page....

From: David Blanco <dablanco(at)gmail(dot)com>
To: pgsql-php(at)postgresql(dot)org
Subject: Re: Printing off the page....
Date: 2005-05-13 11:49:03
Message-ID: ef2a8951050513044942a5251a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

Hi!

2005/5/13, SG Edwards <s0460205(at)sms(dot)ed(dot)ac(dot)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

In response to

Browse pgsql-php by date

  From Date Subject
Next Message Volkan YAZICI 2005-05-13 11:58:50 Re: Printing off the page....
Previous Message SG Edwards 2005-05-13 09:55:12 Printing off the page....