Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $arrs = array(
- 'a'=>'Abid',
- 'b'=>'Babul',
- 'c'=>'Jamal',
- 'd'=>'Kamrul',
- 'e'=>'Rana',
- 'f'=>'Mamun',
- 'g'=>'Babul',
- 'h'=>'Akram',
- 'i'=>'Kamrul'
- );
- echo 'Before Duplicate Check';
- echo '<pre>';
- print_r($arrs);
- echo '</pre>';
- // Duplicate check
- $without_duplicate = array();
- foreach($arrs as $arr){
- if(!in_array($arr,$without_duplicate)){
- //array_push($without_duplicate,$arr);
- $without_duplicate[] = $arr;
- }
- }
- echo 'After Duplicate Check';
- echo '<pre>';
- print_r($without_duplicate);
- echo '</pre>';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement