Comparing two string to see if their pattern matches : I have two arrays one outputting 

    $a = ( [0] => a [1] => b [2] => b [3] => a )

and the other outputting 

    $b = ( [0] => dog [1] => cat [2] => cat [3] => dog )

how can i compare the pattern in both arrays.