public static function arrayDropdown(array $raw, $partition, $key, $value)
    {
        $output = array();

        foreach (self::arrayPartition($raw, $partition) as $target => $data) {
            foreach ($data as $innerKey => $innerValue) {
                if (isset($innerValue[$key], $innerValue[$value])) {
                    $output[$target][$innerValue[$key]] = $innerValue[$value];
                }
            }
        }

        return $output;
    }
public static function arrayDropdown(array $raw, $partition, $key, $value)
    {
        $output = array();

        foreach (self::arrayPartition($raw, $partition) as $target => $data) {
            foreach ($data as $innerKey => $innerValue) {
                if (isset($innerValue[$key], $innerValue[$value])) {
                    $output[$target][$innerValue[$key]] = $innerValue[$value];
                }
            }
        }

        return $output;
    }
public static function arrayDropdown ( array $ raw , $ partition , $ key , $ value ) { $ output = array ( ) ; foreach ( self :: arrayPartition ( $ raw , $ partition ) as $ target => $ data ) { foreach ( $ data as $ innerKey => $ innerValue ) { if ( isset ( $ innerValue [ $ key ] , $ innerValue [ $ value ] ) ) { $ output [ $ target ] [ $ innerValue [ $ key ] ] = $ innerValue [ $ value ] ; } } } return $ output ; }
Drops a raw result-set into partitions and creates inner array with key => value pairs

@param array $raw
@param string $partition The key to be considered as partition
@param string $key
@param string $value
@return array
Drops a raw result - set into partitions and creates inner array with key = > value pairs