From: Roberto Mello <rmello@cc.usu.edu>
To: Christian Marschalek <cm@chello.at>
Cc: [PHP] PostgreSQL <pgsql-php@postgresql.org>
Subject: Re: Splitting strings
Date: Mon, 23 Apr 2001 10:04:49 -0600
Message-ID: <20010423100449.A15308@cc.usu.edu> (raw)
In-Reply-To: <000001c0cc0d$7dfabf40$0200a8c0@server>
References: <000001c0cc0d$7dfabf40$0200a8c0@server>
On Mon, Apr 23, 2001 at 05:53:08PM +0200, Christian Marschalek wrote:
> How would you split a string which is seperated by * with PHP?
>
> Like "abc*def*ghi" into "abc","def","ghi"?
$origString = "abc*def*ghi";
$tokens = explode("*",$origString);
$token[0] ---> abc
$token[1] ---> def
...
-Roberto
--
+----| http://fslc.usu.edu USU Free Software & GNU/Linux Club |------+
Roberto Mello - Computer Science, USU - http://www.brasileiro.nethttp://www.sdl.usu.edu - Space Dynamics Lab, Developer
Sir -- My first job was programming binary load lifter.
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: rmello@cc.usu.edu, cm@chello.at
Subject: Re: Splitting strings
In-Reply-To: <20010423100449.A15308@cc.usu.edu>
References: <000001c0cc0d$7dfabf40$0200a8c0@server> <20010423100449.A15308@cc.usu.edu>
* 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