title: Undefined error in php json array
body: <p>I am getting undefined error in this code. I tried isset but it is becoming clumsy..is there any sweet way to handle this piece of code</p>
  
  <p>This works well in php 5.6.30 but throwing errors in php 5.6.36</p>
  
  <pre><code>foreach($response as $key =&gt; $value){
  $exp_table .= "&lt;tr&gt;";
  foreach($fields_arr as $keys =&gt; $values){
  
  $exp_table .= "&lt;td&gt;";
  if($fields_arr[$keys]["json_subcategory"]==""){
  $exp_table .=  $response[$key][$fields_arr[$keys]["api_subcategory"]][$fields_arr[$keys]["field"]];
  } 
  if($fields_arr[$keys]["api_subcategory"]==""){
  $exp_table .=  $response [$key][$fields_arr[$keys]["json_subcategory"]]$fields_arr[$keys]["field"]];
  }
  if(($fields_arr[$keys]["json_subcategory"]=="") &amp;&amp; ($fields_arr[$keys]["api_subcategory"]=="")){
  $exp_table .=  $response [$key][$fields_arr[$keys]["field"]];
  }
  
  if(($fields_arr[$keys]["json_subcategory"]!="") &amp;&amp; ($fields_arr[$keys]     ["api_subcategory"]!="")){
  $exp_table .=  $response [$key][$fields_arr[$keys]["json_subcategory"]][$fields_arr[$keys]["api_subcategory"]][$fields_arr[$keys]["field"]];
  }
  </code></pre>