 <p>Put the tags into an array. Each array being respectively called Post A / Post B etc. Then use <code>array_diff_assoc()</code>, to figure out how different the arrays are. </p> <p>But really, Ivars solution would work better, this is easier to understand though :)</p>