I would like to test if the key of an associative array exist in my `$_POST`.

my $\_POST is like that:

```
$_POST["balle"]["x"] = 5;
$_POST["balle"]["y"] = 5;
$_POST["balle"]["z"] = 5;

```

or like that by example:

```
$_POST["p1"][1]["vit"] = 7;
$_POST["p1"][1]["angle"] = 32;
$_POST["p2"][2]["vit"] = 17;
$_POST["p2"][2]["angle"] = 2;

```

the values don't matter but I must check how are my `$_POST` keys.
I don't understand how i can test recursivly that because the `$_POST` can change and have differents forms.

I have try this:

```
function Check_post($new, $arr)
{
    echo "Init<br/>";
    $res = true;
    if (is_array($new))
    {
        foreach ($new as $key => $value)
        {
            if (!in_array($key, $arr))
            {
                echo "Fail $key";
                print_r($arr);
                return (false);
            }
            $res = $res & Check_post($new[$key], $arr[$key]);
        }
    }
    else
        $res = in_array($new, $arr);
    echo "MY RESULT";
    var_dump($res);
    return ($res);
}

$b = array();
$b["balle"] = array("x", "y", "z");

$post = array();
$post["balle"] = array();
$post["balle"]["x"] = 50;
$post["balle"]["y"] = 50;
$post["balle"]["z"] = 50;

echo "<pre>";
print_r($b);
echo "</pre><pre>";
print_r($post);
echo "</pre>";
Check_post($b, $post);

```

but i got `"Fail balle"`. my `$post` variable is to simulate the real `$_POST` and for make it easier to test.

EDIT:
The function should work like that:  

1) test if "balle" exist in $post  

2) "balle" exist so recursive call  

3) test if "x" exist in `$post["balle"](recursive)`  

4) test if "y" exist in `$post["balle"](recursive)`  

5) test if "z" exist in `$post["balle"](recursive)`  

6) all existe so $res = true