title: How to echo js value in php
body: <p>I have a script showing below</p>
  
  <pre><code> for (var i = 0; i &lt; checkboxes.length; i++) {
          var checkbox = checkboxes[i];
          checkbox.onclick = function() {
              var currentRow = this.parentNode.parentNode;
              var secondColumn = currentRow.getElementsByTagName("td")[1];
  
              alert("My text is: " + secondColumn.textContent );
          };
      } 
  </code></pre>
  
  <p>SO I have a variable <strong>secondcolumn</strong> I want value of this variable in php... How can I do this...
   I have tried this in php:</p>
  
  <ol>
  <li><p><code>echo $id= secondColumn.value;</code></p></li>
  <li><p><code>echo "&lt;script&gt;alert('".$id."');&lt;/script&gt;";</code></p></li>
  </ol>
  
  <p>but not work anymore... Please help</p>