Re: [PHP] String parsing help

2003-08-21 Thread Jonatan Pugliese.
] String parsing help From: Jonatan Pugliese. [EMAIL PROTECTED] From: Matt Matijevich [EMAIL PROTECTED] I have have a string that I need to split into 3 different variables: City,State, and Zip. Here is a couple examples of the strings I need to parse: ANCHORAGE AK 99507-6420

[PHP] String parsing help

2003-08-20 Thread Matt Matijevich
I have have a string that I need to split into 3 different variables: City,State, and Zip. Here is a couple examples of the strings I need to parse: ANCHORAGE AK 99507-6420 JUNEAU AK 99801 NORTH LITTLE ROCK AR 72118-5227 Does anyone have an idea how I could slit this into the appropriate

Re: [PHP] String parsing help

2003-08-20 Thread Jonatan Pugliese.
$vector=split( , $string, ); $City=$vector[0]; $State=$vector[1]; $Zip=$vector[2]: - Original Message - From: Matt Matijevich [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 5:11 PM Subject: [PHP] String parsing help I have have a string that I need

Re: [PHP] String parsing help

2003-08-20 Thread Curt Zirzow
* Thus wrote Matt Matijevich ([EMAIL PROTECTED]): I have have a string that I need to split into 3 different variables: City,State, and Zip. Here is a couple examples of the strings I need to parse: ANCHORAGE AK 99507-6420 JUNEAU AK 99801 NORTH LITTLE ROCK AR 72118-5227 Does

Re: [PHP] String parsing help

2003-08-20 Thread Rafael Zanetti
=$vector[0]; $State=$vector[1]; $Zip=$vector[2]: - Original Message - From: Matt Matijevich [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 5:11 PM Subject: [PHP] String parsing help I have have a string that I need to split into 3 different variables

Re: [PHP] String parsing help

2003-08-20 Thread CPT John W. Holmes
From: Jonatan Pugliese. [EMAIL PROTECTED] From: Matt Matijevich [EMAIL PROTECTED] I have have a string that I need to split into 3 different variables: City,State, and Zip. Here is a couple examples of the strings I need to parse: ANCHORAGE AK 99507-6420 JUNEAU AK 99801 NORTH

Re: [PHP] String parsing help

2003-08-20 Thread Steve Edberg
Or (untested): $String = 'NORTH LITTLE ROCK AR 72118-5227'; $Bits = split(strrev($String), '[[:space:]]+', 3); $Zip = strrev($Bits[0]); $State = strrev($Bits[1]); $City = strrev($Bits[2]); ...could also use preg_split() - steve At 4:44 PM -0400 8/20/03, CPT John W. Holmes [EMAIL PROTECTED]