title: Get data from database and append data to aframe
body: <p>I want to get data from database and append that data to aframe. I did and data is getting from the database but not appending to the aframe scene. Here is my working flow.
  This index file:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta charset="UTF-8"&gt;
  &lt;script src="https://aframe.io/releases/0.8.0/aframe.min.js"&gt;&lt;/script&gt;
  &lt;script 
  src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt; 
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;a-scene id="scene"&gt;
      &lt;a-camera id="camera" position="0 0 2" &gt;    
      &lt;/a-camera&gt;
    &lt;a-sky color="#000"&gt;&lt;/a-sky&gt;
  &lt;/a-scene&gt;
  &lt;script&gt;
      var ajax = new XMLHttpRequest();
      var method = "GET";
      var url = "data.php";
      var asychronous = true;
  
      ajax.open(method,url,asychronous);
      ajax.send();
  
      ajax.onreadystatechange = function(){
          if(this.readyState==4 &amp;&amp; this.status==200){
              var data = JSON.parse(this.responseText);
              console.log(data);
  
              var html = "";
              var username = "";
              for(var i=0;i&lt;data.length;i++){
                  username = data[i].username;
                  html += "&lt;a-scene&gt;";
                  html += +username;
                  html += "&lt;/a-scene&gt;";
              }
  
              var totalText1 = document.createElement('a-text');
              totalText1.setAttribute('position',{x:0, y:0, z:0});
              totalText1.setAttribute('color',"#fff");
              totalText1.setAttribute('value',username);
              totalText1.setAttribute('scale',{x:1.6, y:1.6, z:1.6});
              document.getElementById("scene").appendChild(totalText1);
          }
      }
  &lt;/script&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>Here is <code>data.php</code> file</p>
  
  <pre><code>&lt;?php 
  $conn = mysqli_connect("localhost","root","","test");
  
  $query = "SELECT * FROM usertest WHERE language='english'";
  $result = mysqli_query($conn,$query);
  $data = array();
  while($row = mysqli_fetch_assoc($result)){
      $data = $row;
  }
  
  echo json_encode($data);
  ?&gt;
  </code></pre>
  
  <p>Data retrieving is okay.But is there any way to append those data to aframe scene?</p>