public function getPopularTags()
    {
        $question = $this->findAll();

        $tagsMultiArray = array_map(function ($question) {
            return explode(',', $question->tags);
        }, $question);

        // Merge multi array, count values, sort high to low
        $tagArr = array_count_values(call_user_func_array("array_merge", $tagsMultiArray));
        arsort($tagArr);
        return $tagArr;
    }
public function getPopularTags()
    {
        $question = $this->findAll();

        $tagsMultiArray = array_map(function ($question) {
            return explode(',', $question->tags);
        }, $question);

        // Merge multi array, count values, sort high to low
        $tagArr = array_count_values(call_user_func_array("array_merge", $tagsMultiArray));
        arsort($tagArr);
        return $tagArr;
    }
public function getPopularTags ( ) { $ question = $ this -> findAll ( ) ; $ tagsMultiArray = array_map ( function ( $ question ) { return explode ( ',' , $ question -> tags ) ; } , $ question ) ; // Merge multi array, count values, sort high to low $ tagArr = array_count_values ( call_user_func_array ( "array_merge" , $ tagsMultiArray ) ) ; arsort ( $ tagArr ) ; return $ tagArr ; }
Returns array of tags, keys are name, value is the integer of how many.

@return array
Returns array of tags keys are name value is the integer of how many .