function removeCommonWords($input){
// EEEEEEK Stop words
$commonWords = array('a','able','about','above','abroad','according','accordingly','across','actually','adj','after','afterwards','again','against','ago','ahead','all','allow','allows','almost','alone','along','alongside','already','also','although','always','am','amid', 'etc');
return preg_replace('/('.implode('|',$commonWords).')/','',$input);
}
//Use it:
$mycleantext = removeCommonWords("I like the people with great ideas.");
array_diff( [312, 401, 15, 401, 3], [401] ) // removing 401 returns [312, 15, 3]
// https://stackoverflow.com/questions/7225070/php-array-delete-by-value-not-key#:~:text=with%20one%20element.-,array_diff(%20%5B312%2C%20401%2C%2015%2C%20401%2C%203%5D%2C%20%5B401%5D%20)%20//%20removing%20401%20returns%20%5B312%2C%2015%2C%203%5D,-It%20generalizes%20nicely
array_diff( array(312, 401, 15, 401, 3), array(401) ) // removing 401 returns [312, 15, 3]