[solved] Getting a string up to a specified string
Posted: Tue Nov 08, 2005 10:48 am
I have strings with company names... Every webmaster wants to control and correct the data from the mistakes of users.
Given company names I have want to strip the Inc. off the very end and save everything up to the Inc. After I do that, I'll add my own Inc.
The common mistypings of Inc. are "inc" "inc." "INC" etc, etc...
How would I take off the INC?
My method isn't working.
Given company names I have want to strip the Inc. off the very end and save everything up to the Inc. After I do that, I'll add my own Inc.
The common mistypings of Inc. are "inc" "inc." "INC" etc, etc...
Code: Select all
$string = "THOMAS BROS INC.";My method isn't working.