search for a string
<p>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).</p>

<p>there are almost 150 different string I want to search them in the thousand text files.
I write this code </p>

<pre><code>foreach($countries as $cont)

{

    if(stripos($text,$cont))

    {

        $country=$cont;
</code></pre>

<p>and here is a few line of countries.php (I include this file) :</p>

<pre><code>$countries['AD'] = 'Andorra';

$countries['AE'] = 'United Arab Emirates';

$countries['AF'] = 'Afghanistan';

$countries['AG'] = 'Antigua And Barbuda';

$countries['AI'] = 'Anguilla';

$countries['AL'] = 'Albania';
</code></pre>

<p>For example I want to print 'Arabian' when it was a match for 'United Arab Emirates'...</p>
