Assign array to another array values
<p>Lets say i have this  <a href="http://php.net/manual/en/language.types.array.php" rel="nofollow noreferrer">array</a>:</p>

<pre><code>$first = ['hi', 'by', 'nice']
</code></pre>

<p>I am going to assign another array to this array items.In fact doing a <code>foreach</code> loop and due to situation assign a new array to desired array item.
Now i want turn it to this:</p>

<pre><code>$second = ['hi', 'by' =&gt; ['really' =&gt; 'yes'], 'nice']
</code></pre>

<p>How can i do it programmatically?</p>