title: How to properly combine PHP result in this javascript line?
body: <p>I have confirmation alert using <a href="http://bootboxjs.com/" rel="nofollow noreferrer">bootbox,js</a>. In the bootbox, user is allowed to make a custom html form. But, I have some of my form element/value that is populated from PHP foreach. I've tried to write like this but it's not working. The alert is not triggered.</p>
  
  <pre><code>bootbox.confirm({
          title   : "Testing",
          message : 
          "&lt;form id='test'&gt;\
           &lt;h3&gt;Dept: &lt;/h3&gt;\
           &lt;table width='100%' cellspacing='0' cellpadding='3px'&gt;\
           &lt;?php foreach($dept as $row_dept){ ?&gt;
           &lt;tr&gt;\
               &lt;td align='center' width='5%'&gt;&lt;input type='checkbox' name='first_name' /&gt;&lt;/td&gt;\
               &lt;td align='left'&gt;"+&lt;?php $row_dept-&gt;dept; ?&gt;+"&lt;/td&gt;\ /*If I remove this line, there is no error. But no value is shown*/
           &lt;/tr&gt;\
           &lt;?php }; ?&gt;
           &lt;tr&gt;\
               &lt;td colspan='2'&gt;&lt;h3&gt;Disposisi&lt;/h3&gt;\&lt;textarea id='disposisi' name='disposisi' class='form-control'&gt;&lt;/textarea&gt;&lt;/td&gt;\
           &lt;/tr&gt;\
           &lt;/table&gt;\
           &lt;/form&gt;",
          buttons : {
                      cancel  : { label: '&lt;i class="fa fa-times"&gt;&lt;/i&gt; Batal' },
                      confirm : { label: '&lt;i class="fa fa-check"&gt;&lt;/i&gt; OK'}
          },
          callback: function (result) {
              if(result == true){
                  var disposisi = $("#test").find('textarea[name=disposisi]').val();
                  alert(disposisi);
              }
          }
      });
  </code></pre>