Removing duplicate values from an array without using any pre-defined function

$arr = array(100,40,1,4,5,7,8,9,8,7,5,17,50,4);
$rem_dup =array();

foreach($arr as $k => $v){
$rem_dup[$v]=$v;

}
echo '<pre>';print_r($rem_dup);



Comments

Popular posts from this blog

ARRAY