array is not returning value for given key
<p>I am using following php code...</p>

<pre><code>$settings[] = get_app_settings();
echo $settings['weight_unit'];
</code></pre>

<p>but its throwing error 'undefined index'.</p>

<p>and when i do <code>print_r($settings);</code> it generates following...</p>

<pre><code>Array ( [0] =&gt; Array ( [support_email] =&gt; info@domain.com [support_phone] =&gt; 9812345678 [currency_symbol] =&gt; $ [weight_unit] =&gt; g. [catalogue_image_width] =&gt; 450 [catalogue_image_height] =&gt; 675 [single_product_image_width] =&gt; 500 [single_product_image_height] =&gt; 500 [product_image_width] =&gt; 200 [product_image_height] =&gt; 200 [tax_rate] =&gt; 1 [shipping_charges] =&gt; 0 ) ) 
</code></pre>

<p>Then why is it not returning value for <code>$settings['weight_unit'];</code> , please help, thanks.</p>
