Display duplicate Keywords from your Title Tag, PHP Code. I whipped this up really quick so please don’t criticize. It’s probably going to be the basis to something much bigger. But I was recently in the need of a script that could flag and report what keywords I had repeated in a list of given title tags.

You all in the SEO business understand that repeating keywords a bunch of times (A.K.A keyword stuffing) is not a tactic that should be practiced.

Feel free to use it and twist it up, but please let me know what you come up with. This would probably be even more valuable if there was some kind of white list feature to take advantage of. I’ll add it if I end up growing this out.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?
function whosUnique($str){
   $parsStr=explode(' ', strtolower($str) );
   $wordArray=array_unique($parsStr);
   $result = array_diff_assoc($parsStr, $wordArray);

return array($str,$parsStr,$wordArray,$result);
}

$str="Briefcases &amp; Totes - Business Tote, Men's Briefcases, Women's Briefcases";

$result = whosUnique($str);

print '<pre>';
print_r($result);
print '</pre>';
?>