Translate string into reference to associative array index in PHP
<p>I have an array like this:</p>

<pre><code>[0] =&gt; [basketball][player]
[1] =&gt; [basketball][threes][player]
[2] =&gt; [basketball][home][leaders][player]
[3] =&gt; [basketball][away][leaders][player]
</code></pre>

<p>I want to translate each element into a reference to a certain element in an associative array:</p>

<pre><code>$post['basketball']['player']
$post['basketball']['threes']['player']
etc.
</code></pre>

<p>Is there any way to automatically translate the former into the latter? It would be super convenient if so, and presumably super inconvenient if not, so I hope there's a way, but I don't know what it might be.</p>
