title: I am getting an error php. Undefined index
body: <pre><code>foreach($formattedDatas as $key =&gt; $formattedData) {    
          foreach ($formattedData as $keyFormat =&gt; $valueFormat) {        
                  $brandDataArray['sales_price']  += $valueFormat['total_price'];
          }           
  }
  </code></pre>
  
  <p>I am getting this notice:</p>
  
  <pre><code>A PHP Error was encountered
  Severity: Notice
  Message: Undefined index: sales_price
  Filename: models/sales_aggregated.php
  Line Number: 34
  </code></pre>
  
  <p>Can somebody help me resolve this?</p>