- var_dump: documentation ( source)
- error_reporting: documentation ( source)
<?php
error_reporting(E_ALL);
$arry= array("1"=>"20", "2"=>"20", "3"=>"30", "4"=>"40", "5"=>"20");
$results = array();
foreach($arry as $key=>$value) {
$results[$value][] = $key;
}
var_dump($results);