X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DA5AF538F4 for ; Fri, 13 May 2005 08:49:11 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 16490-09 for ; Fri, 13 May 2005 11:49:01 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.200]) by svr1.postgresql.org (Postfix) with ESMTP id AE37B537E1 for ; Fri, 13 May 2005 08:49:00 -0300 (ADT) Received: by rproxy.gmail.com with SMTP id i8so191050rne for ; Fri, 13 May 2005 04:49:04 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Ap1B8H3Br/YZ5WQdz5F0m3Rew5G0L8Yxk5sMLB4nWe+fPjlfhQmV+lrJS805c+n0l6uLTF3QvyI1NJUp8wbrQ4BtejjoAwrF/dgg+SaYMQe08GnKvnZ4XaIMmV+SAU7Rd2twgQb01Er9nN9J/jKtYccBfFe5NfEMqVZ2ijzYPPU= Received: by 10.38.104.76 with SMTP id b76mr731540rnc; Fri, 13 May 2005 04:49:03 -0700 (PDT) Received: by 10.38.97.31 with HTTP; Fri, 13 May 2005 04:49:03 -0700 (PDT) Message-ID: Date: Fri, 13 May 2005 13:49:03 +0200 From: David Blanco Reply-To: David Blanco To: pgsql-php@postgresql.org Subject: Re: Printing off the page.... In-Reply-To: <1115978112.428479801cb7b@sms.ed.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <1115978112.428479801cb7b@sms.ed.ac.uk> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.398 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200505/25 X-Sequence-Number: 3139 Hi! 2005/5/13, SG Edwards : >=20 > Hi guys, >=20 > I have a postgres database connected to a website using PHP. > I have a table that stores gene sequences which are very long (approx. 80= 0 > characters). >=20 > If I try and print this, it prints as a single line which runs off the pa= ge. 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