check out the explode function vennlig hilsen Øyvind
On Wed, 29 Jan 2003, Scott Fletcher wrote: > Just curious, is there a PHP function that will break up the string for us? > > Here's the example > > --clip-- > //Original > $name = "Jennifer B Cuff"; > > //Whatever is to be end result of the original > $first_name = "Jennifer"; > $middle_name = "B"; > $last_name = "Cuff"; > --clip-- > > It is a mind challenging game to seperate the data from the whitespace and > break them up. I wrote a lengthy script to do it for me but it's not > perfect. I welcome someone with a fresh mind to do that for me. My next > nightmare is to break up the address into 1) street number, 2) street name, > 3) street tty, 4) city, 5) state, 6) zip while I have to interrupt it the > script to put in the "N/A" in street number, street name and street tty if > there is something like "PO Box 1600" or "Apt #23"... It is a sucker that > the credit bureau, Experian doesn't keep things any simplier. I like > Equifax better. > > You up to the challenge?? > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php