Question: How do I create a function to check if a number is inside an array a certain times and returns `true`. I tried to use `array_exist` but it only check if a number exist and there is no param for how many of them exist. Is there a built in function for this? 

I appreciate it if someone can point me to the right direction. I been thinking about it and cant seem to figure out.

Answer: 
If I understood correctly, you can use this (straight from the [PHP manual](http://php.net/manual/en/function.array-count-values.php)):

```
$array = array(1, "hello", 1, "world", "hello");
print_r(array_count_values($array));

```

outputs

```
Array
(
    [1] => 2
    [hello] => 2
    [world] => 1
)

```

You can easily make a function you need out of this
```
    $array = array(1, "hello", 1, "world", "hello");
    print_r(array_count_values($array));
    Array
(
    [1] => 2
    [hello] => 2
    [world] => 1
)

    you can know more about 
    http://www.php.net/manual/en/function.array-count-values.php

```