try this one if helpful
<?php
$text="Admanya, India's first consumer education cum advocacy website listens to the consumers and not just hear them. Admanya is the best platform for consumers to voice their opinions, compare the product features and service quality, read user reviews, build relationships through interactive exchanges, and get detailed product information about different brands. You can also create your own space through profile, blogs, discussion and comments";
echo $text."<br><br>";
$newarray1=array();
$exclude_words1 =array();
$newarray1[]="@ to @" ;
$newarray1[]="@ about @" ;
$newarray1[]="@ and @" ;
$newarray1[]="@ amp @" ;
$newarray1[]="@ at @" ;
$newarray1[]="@ admanya @" ;
$newarray1[]="@ first @";
//triming the user given value first
$s=strtolower(trim($text));
//i have to exclude the following words in the user given string for that i'm using below variable and storing in array those
$exclude_words1 =$newarray1;
$s3 = preg_replace($exclude_words1, ' ', $s);
$exclude_symbs = array('@[0-9]@','@.@','@\,@','@:@','@"@','@\?@','@(@','@)@','@!@','@\/@','@\&@','@\ @');
$exclude_words1 = array('to','admanya','amp','about','and','first','at');
$s1 = preg_replace($exclude_symbs, " ", strtolower(trim($s3))); // Strip excluded symbols
/
echo strtolower($s1)."------<br><br>";;
echo "<br>";/
$words = explode(' ',strtolower($s1));
//print_r($words);
$word_final=array();
//print_r($exclude_words1);
for($i=0;$i<count($words);$i++)
{
if(!(in_array($words[$i],$exclude_words1)))
{ //echo $words[$i]."--$i<br>";
$word_final[]=$words[$i];
}
}
print_r($word_final);
echo "<br>";