title: <div id="variable"></div> as value inside input text?
body: <pre><code>&lt;input type="text" name="weight" id="weight" class="form-control input-sm" placeholder="Weight" value="&lt;div id="variable"&gt;&lt;/div&gt;"&gt;
  </code></pre>
  
  <p>I have this code. I want the value from "weight" to get the content of <code>&lt;div id="variable"&gt;&lt;/div&gt;</code> which is generated with jquery. It is a number like 82 for example.</p>
  
  <p>How can I do that?</p>
  
  <p>I've tried with strip_tags from php but when doing that, it also stopping the thing to work because it is removing <code>&lt;div id="variable"&gt;&lt;/div&gt;</code>.</p>
  
  <p>When I click calculate in the window, it will generate "159". I want 159 to be added as value in my weight input.</p>
  
  <p><a href="https://i.stack.imgur.com/ATNK5.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ATNK5.jpg" alt="enter image description here"></a></p>
  
  <p>The value inside <code>&lt;div id="variable"&gt;&lt;/div&gt;</code> is dynamically generated from a previous jquery code. So <code>&lt;div id="variable"&gt;&lt;/div&gt;</code> starts as <code>&lt;div id="variable"&gt;&lt;/div&gt;</code>, with no value</p>