I want to search in large piece of texts for different strings and if the match found for each string it return me a special string (not the matched string).
there are almost 150 different string I want to search them in the thousand text files. I write this code
foreach($countries as $cont)
{
if(stripos($text,$cont))
{
$country=$cont;
and here is a few line of countries.php (I include this file) :
$countries['AD'] = 'Andorra';
$countries['AE'] = 'United Arab Emirates';
$countries['AF'] = 'Afghanistan';
$countries['AG'] = 'Antigua And Barbuda';
$countries['AI'] = 'Anguilla';
$countries['AL'] = 'Albania';
For example I want to print 'Arabian' when it was a match for 'United Arab Emirates'...