I want to remove duplicate values from array a and get a new array b without duplicate values. What am doing wrong. HELP!!!
<?php
$a = array('pasta','vegetables','vegetables','salad','salad');
$b=array();
for ($i=0;$i<=count($a);$i++){
if(!in_array($b,$a[$i])){
array_push($b,$a[$i]);
}
}
print_r($b);
?>