title: Result values from database - mysql
body: <p>I have this table, table1:</p>
  
  <pre><code>+----+-------+----------+
  | ID | MONTH | QUANTITY |
  +----+-------------+----+
  | 1  |   1   |     1    |
  | 2  |   2   |     2    |
  | 3  |   7   |     3    |
  | 4  |   4   |     1    |
  | 5  |   2   |     3    |
  | 6  |  12   |     8    |
  | 7  |   1   |     6    |
  +----+-------+----------+
  
  My file php is:
  
   &lt;?php
  include 'bd_cnx.php';
  $ret =[];
    $sql = "SELECT 
            FROM 
            ";
  
    $result = $conn-&gt;query($sql);
    if ($result-&gt;num_rows &gt; 0){
  
      while($row = $result-&gt;fetch_assoc()){
        //floatval() transforma sirul numeric in numar
        $ret[] =[$row['MONTH'], floatval($row['QUANTITY'])];
            }
    }
    else {
        echo "result 0";
        }
  ?&gt;
  </code></pre>
  
  <p>How can I return to the values in this form? [ [1,7],[2,5],[3,0],[4,1],[5,0],[6,0],[7,3],[8,0],[9,0],[10,0],[11,0],[12,8] ]</p>
  
  <p>Thank you!</p>