protected function buildChoiceLookupList($choices)
    {
        $array = array();

        foreach ($choices as $range => $choice) {
            $range = explode(':', $range);

            if (count($range) < 2) {
                $range[] = '';
            }

            $array[] = (object) array(
                'range' => (object) array(
                    'from' => $range[0],
                    'to' => $range[1],
                ),
                'string' => $choice
            );
        }

        return $array;
    }
protected function buildChoiceLookupList($choices)
    {
        $array = array();

        foreach ($choices as $range => $choice) {
            $range = explode(':', $range);

            if (count($range) < 2) {
                $range[] = '';
            }

            $array[] = (object) array(
                'range' => (object) array(
                    'from' => $range[0],
                    'to' => $range[1],
                ),
                'string' => $choice
            );
        }

        return $array;
    }
protected function buildChoiceLookupList ( $ choices ) { $ array = array ( ) ; foreach ( $ choices as $ range => $ choice ) { $ range = explode ( ':' , $ range ) ; if ( count ( $ range ) < 2 ) { $ range [ ] = '' ; } $ array [ ] = ( object ) array ( 'range' => ( object ) array ( 'from' => $ range [ 0 ] , 'to' => $ range [ 1 ] , ) , 'string' => $ choice ) ; } return $ array ; }
Build a choice lookup list from the passed language choice array.

The input array is something like:
array(
'1'   => 'an apple',
'2:5' => 'a few apples',
'12'  => 'a dozen of apples',
'13:' => 'a pile of apples'
)

@param array $choices The language strings.

@return array
Build a choice lookup list from the passed language choice array .