Which Array did value come from
<p>I have multiple arrays shown below.</p>

<pre><code>&lt;?php
$arrLayout = array(
    "section1" =&gt; array(

        "wXBMCLibrary" =&gt; array(
            "title" =&gt; "XBMC Library",
            "display" =&gt; ""
        ),
        "wRecentMovies" =&gt; array(
            "title" =&gt; "Recent Movies",
            "display" =&gt; ""
        )
    ),
    "section2" =&gt; array(
        "wComingEpisodes" =&gt; array(
            "title" =&gt; "Coming Episodes",
            "display" =&gt; ""
        ),
        "wSearch" =&gt; array(
            "title" =&gt; "Search",
            "display" =&gt; ""
        )
    ),
 );
</code></pre>

<p>From looking at the code I can see that wXBMCLibrary comes from within section1. Is there a way to check via php which section each thing comes from? So if I moved wXBMCLibrary to section 2 and reran the code it would show that it is now in section 2. Hope that makes sense.</p>

<p>I want to </p>

<pre><code>if ( $wXBMCLibrary == "false" )
{ 
unset($arrLayout['section1']['wXBMCLibrary']);
}
</code></pre>

<p>This all works perfectly except that wXBMCLibrary could be in section2 because it dynamically moves so the section1 part in the unset function isn't accurate. I need a way to check which section it is in so that I can replace section1 with a variable defining the current section. </p>

<p>Thanks</p>
