Quote:
Originally Posted by LearningCoder
Maybe you could insert the states like 'New_York' then explode values to array. Once in array, search all state values for a '_' undrerscore character and then replace with a space ' ', which will give you back the original string 'New York'.
That's what I'd do but there is most likely much better ways to do it.
Hope it helps though.
Regards,
LC.
|
I think I know what you mean but my problem is that when I read a line in from the text file, I need to separate the various columns of (state, zip, county). Because there's multiple, varying spaces separating each column, and then of course some cities have a space in them, it's not possible to explode it by a single space. I need to explode it by two spaces or more.
Maybe you already understood that but I figured I'd clarity it a bit more.
I just can't figure out how to explode it by two spaces or more...that's my real issue.