I am trying to create a new string from multiple strings using the most common words between these strings. For example:
$string[0] = 'Apple iPhone 4S 16GB Locked to Orange';
$string[1] = 'iPhone 4S 16GB boxed new';
$string[2] = 'iPhone 4S 16GB unlocked brand new';
$string[3] = 'Apple iPhone 16GB 4S Special Offer';
$string[4] = 'Apple iPhone 4S Sim Free';
## The new string should be:
$new_string = 'Apple iPhone 4S 16GB';
There could be hundreds of original strings, or just 2...
I don't have a clue where to start with this, any help would be really appreciated.