title: Editor says unexpected 'if' with nested PHP in HTML, but don't know why
body: <p>I am nesting PHP in HTML, and I'm getting an "unexpected if" error. But I have no idea what's causing it. The are a lot of single and double quote combinations, so it's a bit confusing, but I think it should work. Can anyone see what the error is?</p>
  
  <p>This is the line that's causing the error, and below that is the entire code:</p>
  
  <pre><code>  .if($index['status']=='Billable'){
                          $status1 = $index['status'];
                          $status2 = '';
                                                      }
  </code></pre>
  
  <p>This is the entire code block:</p>
  
  <pre><code>    &lt;?php
      foreach($sessions as $index)
              {       
              echo "&lt;div class='wrap'&gt;
                      &lt;div class='well session'&gt; 
  
                              Clinic: &lt;a class='clinic-link' title='Click to see clinic sessions'&gt;".$index['org']."&lt;/a&gt;&lt;br&gt;
  
                              Trainer: ".$index['trainer']."&lt;br&gt;
  
                              Date: ".$index['session_date']."&lt;br&gt;
  
                              Duration: ".$index['duration']." hours&lt;br&gt;
  
                              Status: ".$index['status']."&lt;br&gt;&lt;br&gt; 
  
                              Note: ".$index['session_note']."&lt;br&gt;&lt;br&gt;
  
                              &lt;a class='btn btn-lg btn-default edit' class='edit-button' onclick='openEdit(this)'&gt;Edit&lt;/a&gt;
                      &lt;/div&gt;                 
  
                      &lt;div class='well edit-form'&gt;
                              &lt;form action='".$_SERVER['PHP_SELF']."' method='POST'&gt;
                                      &lt;label for='session_edit_clinic'&gt;Clinic:&lt;/label&gt;&lt;br&gt;
                                              &lt;input type='text' name='session_edit_clinic' id='session_edit_clinic' value='".$index['org']."'&gt;&lt;br&gt;&lt;br&gt;
  
                  &lt;label for='session_edit_trainer'&gt;Trainer:&lt;/label&gt;&lt;br&gt;
                                              &lt;input type='text' name='session_edit_trainer' id='session_edit_trainer' value='".$index['trainer']."'&gt;&lt;br&gt;&lt;br&gt; 
  
                                      &lt;label for='session_edit_date'&gt;Date:&lt;/label&gt;&lt;br&gt; 
                                              &lt;input type='date' name='session_edit_date' id='session_edit_date' value='".$index['session_date']."'&gt;&lt;br&gt;&lt;br&gt;                                        
  
                                      &lt;label for='session_edit_duration'&gt;Duration:&lt;/label&gt;&lt;br&gt;
                                              &lt;input type='text' name='session_edit_duration' id='session_edit_duration' value='".$index['duration']."'&gt;&lt;br&gt;&lt;br&gt;
  
                                      &lt;label for='session_edit_note'&gt;Note:&lt;/label&gt;&lt;br&gt;
                                              &lt;textarea  name='session_edit_note' id='session_edit_note' cols='56' rows='7'&gt;".$index['session_note']." &lt;/textarea&gt; &lt;br&gt;&lt;br&gt;"
  
  
                      .if($index['status']=='Billable'){
                          $status1 = $index['status'];
                          $status2 = '';
                                                      }
  
                      else{
                          $status1 = '';
                                                      $status2 = $index['status'];
                                                      }."
                                                      &lt;input type='radio' name='status' value='".$status1."'&gt; Billable&lt;br&gt;
                              &lt;input type='radio' name='status' value='".$status2."'&gt; Not Billable&lt;br&gt;
  
  
                                      &lt;div class='lower-div'&gt;                                               
                                              &lt;input type='submit' class='btn btn-lg btn-default edit session_edit_submit' name='session_edit_submit' id='session_edit_submit' value='Save Changes'&gt;
                                              &lt;a class='btn btn-lg btn-primary close-edit' class='close-edit' style='margin-left: 20px;' onclick='closeEdit(this)'&gt;Close&lt;/a&gt;
                                      &lt;/div&gt;    
                              &lt;/form&gt; 
                      &lt;/div&gt; 
                      &lt;/div&gt;                  
  
                      ";
              }
  
      ?&gt;    
  </code></pre>