From: Bret Hughes <bhughes@elevating.com>
To: pgsql-php list <pgsql-php@postgresql.org>
Subject: [Fwd: Re: Help...]
Date: 16 Dec 2002 16:57:07 -0600
Message-ID: <1040079427.3150.29.camel@bretsony> (raw)
I meant to reply all with this
On Mon, 2002-12-16 at 16:26, Francisco Mosse - (Zivals) wrote:
> Hi!
>
> What is wrong? My server has PHP and Postgre
> I can“t 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', etc.)
>
> $quebuscototal = "abc def ghi jkl";
> $quebuscototal = str_replace(' ',' \', \'',$quebuscototal);
> $quebuscototal = "'$quebuscototal'";
> $quebuscofinal = array($quebuscototal);
> $quees = "$quebuscofinal[1] ";
>
> 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 = "abc def ghi jkl";
$quebuscofinal = split(' ', $quebuscototal);
$quees = "$quebuscofinal[1] "
HTH
Bret
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: bhughes@elevating.com
Subject: Re: [Fwd: Re: Help...]
In-Reply-To: <1040079427.3150.29.camel@bretsony>
References: <1040079427.3150.29.camel@bretsony>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox