Re: Splitting strings - Mailing list pgsql-php

From Roberto Mello
Subject Re: Splitting strings
Date
Msg-id 20010423100449.A15308@cc.usu.edu
Whole thread Raw
In response to Splitting strings  ("Christian Marschalek" <cm@chello.at>)
List 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.

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)




pgsql-php by date:

Previous
From: Martín Marqués
Date:
Subject: Re: SELECT column name
Next
From: "Christian Marschalek"
Date:
Subject: RE: Sessions without cookies