Organizational Research By

Surprising Reserch Topic

Question:how to possible inverse function for array_count_values



asked Sep 13, 2013 in PHP by ashish singh
edited Sep 12, 2013
0 votes
22 views



Related Hot Questions

1 Answer

0 votes

 

    function array_enumerate_keys($array)
    {
        $index;
        $enumerated;
        $values = array_values($array);
        $keys = array_keys($array);
        for($index = 0; $index < count($array); $index++)
        {
            $iteration;
            for($iteration = 0; $iteration < $values[$index]; $iteration++)
            {
                $enumerated .= $keys[$index] . ',';
            }
        }
        
        return explode(',', $enumerated);
    }
?>
answered Sep 13, 2013 by ashish singh
edited Sep 12, 2013

...