Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 670B4476693 for ; Mon, 16 Dec 2002 17:58:42 -0500 (EST) Received: from gateway1.brets.elevating.com (adsl-216-63-236-137.dsl.tulsok.swbell.net [216.63.236.137]) by postgresql.org (Postfix) with ESMTP id E250C47671F for ; Mon, 16 Dec 2002 17:58:18 -0500 (EST) Received: from bretsony.brets.elevating.com (bretsony.brets.elevating.com [192.168.0.158]) by gateway1.brets.elevating.com (8.9.3/8.8.7) with ESMTP id QAA21538 for ; Mon, 16 Dec 2002 16:58:20 -0600 Subject: [Fwd: Re: Help...] From: Bret Hughes To: pgsql-php list Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution/1.0 (Preview Release) Date: 16 Dec 2002 16:57:07 -0600 Message-Id: <1040079427.3150.29.camel@bretsony> Mime-Version: 1.0 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/32 X-Sequence-Number: 1707 I meant to reply all with this On Mon, 2002-12-16 at 16:26, Francisco Mosse - (Zivals) wrote: > Hi! >=20 > What is wrong? My server has PHP and Postgre > I can=B4t understand hoy do I get this error... look > I start with a value ($quebuscototal) and I should get an array like this= ("'abc', 'def', 'ghi', 'jkl') ? > but with this code, what I receive is an array where the first element is= 'abc', 'def', 'ghi', 'jkl' > instead of being 'abc' (and the second one, 'def', the third one 'ghi', e= tc.) >=20 > $quebuscototal =3D "abc def ghi jkl"; > $quebuscototal =3D str_replace(' ',' \', \'',$quebuscototal); > $quebuscototal =3D "'$quebuscototal'"; > $quebuscofinal =3D array($quebuscototal); > $quees =3D "$quebuscofinal[1] "; >=20 > What is wrong with my code? Thanks!! I see what you are trying to do but I think that the internal representation of the variable that contians the string : 'abc ', 'def ', 'ghi ', 'jkl' is not the same as four seperate strings of abc def ghi jkl Use the split function $quebuscototal =3D "abc def ghi jkl"; $quebuscofinal =3D split(' ', $quebuscototal); $quees =3D "$quebuscofinal[1] " HTH Bret