Finding out the duplicate value in an array without using array function in php
1 2 3 4 5 6 7 |
$myArray=array(4,5,2,1,4,3,9,8,7,6,5,3,11,15); $size= count($myArray); for($i=0; $i<$size; $i++) for($j = $i+1; $j < $size; $j++) if($myArray[$i] == $myArray[$j]) echo $myArray[$i]; |