pg.ddx.io pgsql-php@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: Splitting strings
6+ messages / 5 participants
[nested] [flat]
* Re: Splitting strings
@ 2001-04-23 15:51 Timothy_Maguire@hartehanks.com
0 siblings, 0 replies; 6+ messages in thread
From: Timothy_Maguire@hartehanks.com @ 2001-04-23 15:51 UTC (permalink / raw)
To: Christian Marschalek <cm@chello.at>; +Cc: pgsql-php
try
array = explode("*", "abc*def*ghi");
That will put it into and array called array with 3 parts to it.
"Christian Marschalek" <cm@chello.at>@postgresql.org on 04/23/2001 11:53:08
AM
Sent by: pgsql-php-owner@postgresql.org
To: "[PHP] PostgreSQL" <pgsql-php@postgresql.org>
cc:
Subject: Splitting strings
How would you split a string which is seperated by * with PHP?
Like "abc*def*ghi" into "abc","def","ghi"?
Any clues? Thanks in advance :)
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
^ permalink raw reply [nested|flat] 6+ messages in thread
* Splitting strings
@ 2001-04-23 15:53 Christian Marschalek <cm@chello.at>
2001-04-23 16:04 ` Re: Splitting strings Roberto Mello <rmello@cc.usu.edu>
2001-04-23 16:06 ` Re: Splitting strings Dan Wilson <phpPgAdmin@acucore.com>
2001-04-23 16:22 ` Re: Splitting strings Adam Lang <aalang@rutgersinsurance.com>
0 siblings, 3 replies; 6+ messages in thread
From: Christian Marschalek @ 2001-04-23 15:53 UTC (permalink / raw)
To: pgsql-php
How would you split a string which is seperated by * with PHP?
Like "abc*def*ghi" into "abc","def","ghi"?
Any clues? Thanks in advance :)
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Splitting strings
2001-04-23 15:53 Splitting strings Christian Marschalek <cm@chello.at>
@ 2001-04-23 16:04 ` Roberto Mello <rmello@cc.usu.edu>
2 siblings, 0 replies; 6+ messages in thread
From: Roberto Mello @ 2001-04-23 16:04 UTC (permalink / raw)
To: Christian Marschalek <cm@chello.at>; +Cc: pgsql-php
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.net
http://www.sdl.usu.edu - Space Dynamics Lab, Developer
Sir -- My first job was programming binary load lifter.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Splitting strings
2001-04-23 15:53 Splitting strings Christian Marschalek <cm@chello.at>
@ 2001-04-23 16:06 ` Dan Wilson <phpPgAdmin@acucore.com>
2 siblings, 0 replies; 6+ messages in thread
From: Dan Wilson @ 2001-04-23 16:06 UTC (permalink / raw)
To: Christian Marschalek <cm@chello.at>; pgsql-php
http://www.php.net/manual/en/function.explode.php
: How would you split a string which is seperated by * with PHP?
:
: Like "abc*def*ghi" into "abc","def","ghi"?
:
: Any clues? Thanks in advance :)
:
:
: ---------------------------(end of broadcast)---------------------------
: TIP 4: Don't 'kill -9' the postmaster
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Splitting strings
2001-04-23 15:53 Splitting strings Christian Marschalek <cm@chello.at>
@ 2001-04-23 16:22 ` Adam Lang <aalang@rutgersinsurance.com>
2 siblings, 0 replies; 6+ messages in thread
From: Adam Lang @ 2001-04-23 16:22 UTC (permalink / raw)
To: pgsql-php
Use the function "split".
Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
http://www.rutgersinsurance.com
----- Original Message -----
From: "Christian Marschalek" <cm@chello.at>
To: "[PHP] PostgreSQL" <pgsql-php@postgresql.org>
Sent: Monday, April 23, 2001 11:53 AM
Subject: [PHP] Splitting strings
> How would you split a string which is seperated by * with PHP?
>
> Like "abc*def*ghi" into "abc","def","ghi"?
>
> Any clues? Thanks in advance :)
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Splitting strings
@ 2001-04-23 16:23 Christian Marschalek <cm@chello.at>
0 siblings, 0 replies; 6+ messages in thread
From: Christian Marschalek @ 2001-04-23 16:23 UTC (permalink / raw)
To: pgsql-php
Thanks to all for your fast answers! You know who you are :)
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2001-04-23 16:23 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-04-23 15:51 Re: Splitting strings Timothy_Maguire@hartehanks.com
2001-04-23 15:53 Splitting strings Christian Marschalek <cm@chello.at>
2001-04-23 16:04 ` Roberto Mello <rmello@cc.usu.edu>
2001-04-23 16:06 ` Dan Wilson <phpPgAdmin@acucore.com>
2001-04-23 16:22 ` Adam Lang <aalang@rutgersinsurance.com>
2001-04-23 16:23 Re: Splitting strings Christian Marschalek <cm@chello.at>
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