Transferring Ian's contactCompare script to codeigniter