Hi,

On Sa 06.12.2008 01:30 Jason wrote:

> Can you explain how to do an address now into City, State, Zip
> Like: cortland, ny 13045

Test this:

$string = "cortland, ny 13045";
$search = array(", ", ","); # if there is no space after the comma, we make
this ;-)
$replace = array(" ", " ");
$newString = str_replace($search, $replace, $string);
$array = explode(" ", $newString);

--------------------------------------
Old String: cortland, ny 13045
New String: cortland ny 13045

Array
(
    [0] => cortland
    [1] => ny
    [2] => 13045
)
---------------------------------------

Regards from Stuttgart

Conny


PS: Sorry about my perfect english
 

__________ Hinweis von ESET NOD32 Antivirus, Signaturdatenbank-Version 3667
(20081205) __________

E-Mail wurde gepruft mit ESET NOD32 Antivirus.

http://www.eset.com
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to