title: How to get variable from php to array?
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?php
  include 'config.php';
  
  $id_tes = $_GET['id_tes'];
  
  
    $i = mysqli_query($db, "SELECT count(id_tes) FROM report WHERE jawaban='I' and id_tes='$id_tes' GROUP BY id_tes");
    $e = mysqli_query($db, "SELECT count(id_tes) FROM report WHERE jawaban='E' and id_tes='$id_tes' GROUP BY id_tes");
    $n = mysqli_query($db, "SELECT count(id_tes) FROM report WHERE jawaban='N' and id_tes='$id_tes' GROUP BY id_tes");
    $s = mysqli_query($db, "SELECT count(id_tes) FROM report WHERE jawaban='S' and id_tes='$id_tes' GROUP BY id_tes");
    $t = mysqli_query($db, "SELECT count(id_tes) FROM report WHERE jawaban='T' and id_tes='$id_tes' GROUP BY id_tes");
    $f = mysqli_query($db, "SELECT count(id_tes) FROM report WHERE jawaban='F' and id_tes='$id_tes' GROUP BY id_tes");
    $j = mysqli_query($db, "SELECT count(id_tes) FROM report WHERE jawaban='J' and id_tes='$id_tes' GROUP BY id_tes");
    $p = mysqli_query($db, "SELECT count(id_tes) FROM report WHERE jawaban='P' and id_tes='$id_tes' GROUP BY id_tes");
  
   
  $dataPoints1 = array(
    array("label"=&gt; "Intorvert dan Extrovert", "y"=&gt; 56),
    array("label"=&gt; "Sensing dan Intuition", "y"=&gt; 76),
    array("label"=&gt; "Thinking &amp; Feeling", "y"=&gt; 89),
    array("label"=&gt; "Judging &amp; Perceiving", "y"=&gt; 35)
  );
  $dataPoints2 = array(
    array("label"=&gt; "Intorvert dan Extrovert", "y"=&gt; 75),
    array("label"=&gt; "Sensing dan Intuition", "y"=&gt; 43),
    array("label"=&gt; "Thinking &amp; Feeling", "y"=&gt; 54),
    array("label"=&gt; "Judging &amp; Perceiving", "y"=&gt; 34)
  );
    
  ?&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>How to get the value of a variable in php to be displayed in an array to replace a number value (56, 76, 89, 35, 75, 43, 54, 34) to be the result of a variable count of ($ i, $ e, $ n, etc).</p>
  
  <p>Thank's.</p>