I need a PHP function to be written which
1.? Scans a string of text [i.e., $text = 'Alexander the great was great';] to match a predefined list of names in an array [i.e., $listofnames = array('id1'=> 'bob doe', 'id2' => 'alexander pete' );].?
2. The output I want is the ID name ('id1', 'id2', etc)
3.? The search has to be case insensitive
4.? The search has to match any part of the name in $listofnames
Please let me know if you need any more clarification.? Thank you in advance.