i need a sub string comparision where a insensitive keyword 'word' has to be searched in a string 'keyword'. pls note the word 'WORD' can be in be different formats ex"WoRd" or "WOrd" in all permutations and combinations. The substring search should return the string postion for the keyword. Any help on this would be greatly appreciated.
$position = strpos(strtolower('wOrd'), strtolower('keyword'))
This from php.net
To find the position of a string in a case-insensitive manner without converting everything to lowercase, try using stristr: $temp = stristr($haystack,$needle); $pos = strlen($haystack)-strlen($temp);