title: Set or change PHP variable in JavaScript
body: <p>I am new to PHP and JavaScript.. I need to take the height of a div and assign it in to PHP variable so that I can use it later for further processes.</p>
  
  <p>This is how tried it for now, but it did not workout well..</p>
  
  <pre><code>&lt;div id="leftSideDataBox" style="height:auto; overflow:hidden"&gt;
  // some web form contents 
  &lt;/div&gt;
  
  &lt;?php $leftSideDataBoxHight=0;?&gt;
  &lt;script&gt;
       var myDiv = document.getElementById("leftSideDataBox");
       var boxHight=myDiv.clientHeight;
       &lt;?php $leftSideDataBoxHight?&gt;=boxHight;
  &lt;/script&gt;
  &lt;?php if(leftSideDataBoxHight&lt;100)
  {
  //do some window arrangements
  }?&gt;
  </code></pre>
  
  <p>I know it was not ROCKET SCIENCE, but i could not find any solution for it.</p>
  
  <p>When I put a alert to it it displaces the height of the div </p>
  
  <pre><code>&lt;script&gt;
      var myDiv = document.getElementById("leftSideDataBox");
      alert(myDiv.clientHeight)
  &lt;/script&gt;
  </code></pre>
  
  <p>Do you guys have any solutions???  Thank You.. </p>