delete element from 3-d array in php
<pre><code>Array
(
    [15,  BBC company] =&gt; Array
        (
            [147, IT Dep] =&gt; 85
            [150, HR Dep] =&gt; Array
                (
                    [58] =&gt; employee 1
                    [71] =&gt; employee 2
                )

        )

)
</code></pre>

<p>I would like to delete <strong>[58] => employee 1</strong> from array The following is my code, however, it doesn't work.</p>

<p>Can anyone help me? Many thanks!</p>

<pre><code>foreach($arr as $key=&gt;$value){

    foreach ($value as $subKey=&gt;$subVal){

        foreach($subVal as $k=&gt;$v){

            if($k==58){

                echo $k;

                unset($subVal[$k]);

            }
        }

    }

}
</code></pre>

<p><strong>Expected result</strong></p>

<pre><code>Array
(
    [15,  BBC company] =&gt; Array
        (
            [147, IT Dep] =&gt; 85
            [150, HR Dep] =&gt; Array
                (
                    [71] =&gt; employee 2
                )

        )

)
</code></pre>
