title: Using PHP include during conditional statements
body: <p>Is it possible to use an include statement that contains conditional statements in a control structure? It's hard to explain, so here's an example:</p>
  
  <pre><code>if (...) { 
  } 
  elseif (...) { 
  } 
  elseif (...) {
  }
  elseif (...) {
  }
  else {
  }
  </code></pre>
  
  <p>Let's say my third elseif contained a lot of code and I wanted to put it in another file and use an include statement instead. Could I do that? When I tried to, it was giving my an "unexpected T_ELSE" error. So it would be something like this:</p>
  
  <pre><code>if (...) {
  }
  elseif (...) {
  }
  elseif (...) {
  }
  include 'abc.php';
  else {
  }
  </code></pre>
  
  <p>Also, I couldn't find many sources on the web that give a breakdown of the legal usage of include (I checked out php.net, too), like if you could put the conditions of a conditional statement in an separate file and use an include statement to call it, or use an include statement in an echo statement. If anyone has some good references, I'd appreciate it. Thank you all in advance.</p>