in php i need to compare 2 strings.
str1="this is a string"
str2=" this is a string "
I want to consider str1 and str2 to be the same string.
The way I can think is:
trim the strings first. extract the words of each string first, compare the words and then get the result.
Any better way i.e. bulit-in function or something else to make the comparison?