I need to compare the array values with each other.These values are unique IDs. So, have to check whether ID values are repeated.
<?php
$id=array("firstid2012","secondid2014","thirddid2010","fourthid2014");
$idcount=count($id);
for($i=0;$i<$idcount;$i++){
//how to compare??
}
?>
If repeated id is true, then i have to change the value of that array value.So I need to know which array value is repeated also.