title: How to remove "warning:Cannot use a scalar value as an array"
body: <p>here is my code:</p>
  
  <pre><code>$i = 0;
  $list4 = array();
  while($row_sent = $GLOBALS['db']-&gt;sql_fetchrow($res_sent))
  {   
      $sql_sent2 = "SELECT * FROM ".$GLOBALS['table']['sent']." WHERE `sent_id` ='".$row_sent['sent_id']."'";
      //echo $sql_size2; exit;
      $res_sent2 = $GLOBALS['db']-&gt;sql_query($sql_sent2);
      $num = $GLOBALS['db']-&gt;sql_numrows($res_sent2);
      if($num &gt; 0)
      {
          while($row_sent2 = $GLOBALS['db']-&gt;sql_fetchrow($res_sent2))
          {
               $list4[$i]['sent_id']             = $row_sent2['sent_id']; //this line shows error
               $list4[$i]['sent_name']           = $row_sent2['sent_name'];//this line shows error
               $list4[$i]['sent_qty']            = $row_sent['sent_qty'];//this line shows error
          }
      }
      else
      {
        $list4=0;
      }
      $i++;
  }
  </code></pre>