Trying to set array variable from part of another array variable
<p>I'm trying to set a part of array variable into a new array variable like below:</p>

<pre><code>$this-&gt;data['uploadFront'] = array();
$this-&gt;data['uploadFront'] = $this-&gt;data['Card']['uploadFront'];
</code></pre>

<p>But I'm getting undefined index error.</p>

<p>The $this->data['Card'] array is like below:</p>

<pre><code>Array
(
    [Card] =&gt; Array
        (
            [name] =&gt; 
            [company_name] =&gt; 
            [firstname] =&gt; 
            [lastname] =&gt; 
            [position] =&gt; 
            [location] =&gt; 
            [phone] =&gt; 
            [website] =&gt; 
            [mobile] =&gt; 
            [comp_name] =&gt; 0
            [uploadFront] =&gt; Array
                (
                    [name] =&gt; 
                    [type] =&gt; 
                    [tmp_name] =&gt; 
                    [error] =&gt; 4
                    [size] =&gt; 0
                )

            [uploadBack] =&gt; Array
                (
                    [name] =&gt; 
                    [type] =&gt; 
                    [tmp_name] =&gt; 
                    [error] =&gt; 4
                    [size] =&gt; 0
                )

        )

)
</code></pre>

<p>What could be wrong that needs to be fixed in this process?</p>
