title: How to call PHP value in innerHTML with AJAX
body: <p>I have dynamically input fields generated by jQuery like <a href="http://www.sanwebe.com/2013/03/addremove-input-fields-dynamically-with-jquery" rel="nofollow">this</a> </p>
  
  <p>I would like to know how I can echo a PHP-variable when the innerHTML input got a value-tag. </p>
  
  <pre><code>var x2counter = 1;
  var x2data_i = 45;
  
  function addExam2(d2p_1){
      var e = document.getElementById("d2p_1");
  
      e.innerHTML += "&lt;input name='xdata_" + x2data_i + "' placeholder='type in' type='text' value='&lt;?php echo $value;?&gt;'&gt;";
      x2counter++;
      x2data_i++;
  };
  </code></pre>
  
  <p>I know that AJAX can do this. Let`s say i have a PHP file like</p>
  
  <p><strong><em>value.php</em></strong></p>
  
  <pre><code>$value = ('abc' === 'abc') ? 'right' : 'false' ;
  </code></pre>
  
  <p>How can I call <code>value.php</code> inside innerHTML so that it would be something like:</p>
  
  <pre><code>...
   $(wrapper).append('&lt;div&gt;&lt;input type="text" name="something" value="&lt;?php echo $value;?&gt;"/&gt;');
  ...
  </code></pre>
  
  <p>I'm an absolute beginner regarding jQuery so I really would appreciate if there is someone who could help me out.</p>
  
  <p>Thanks alot.</p>