At 15:52 29-1-03, you wrote:
the easiest for the programmer is toJust 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.
* add a space after every dot with str_replace()
* then remove double dots with same
* explode() the string to an array
* first array element is firstname
* last array element is lastname
* if there is something inbetween it's probably all middle names (allow for several middle names for catholic dutch people that tend to have names such as Wilhemus Antonius Johannes Maria den Braber)
Curse those people with double back names, like 'den Braber' here. Or spaced first names.
A little more difficult would be to write a regular expression to split the name. I suggest a google search for ' "regular expressions" firstname, lastname '. This is bound to be something more ppl ran into.
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.
Same idea, more testing. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php