title: Interview Question: Can we have an echo before header?
body: <p>I appeared for php test, their I was asked one question for which I could not find the answer.</p>
  
  <p>The question is like this.</p>
  
  <pre><code>echo "MESSI is injured!!";
  header("Location:somepage.php");
  </code></pre>
  
  <p>Interviewer want both <strong>header</strong> and <strong>echo</strong> to be written on the same page.</p>
  
  <p>I wonder how's it possible.It should give some error like</p>
  
  <p><strong><em>headers already sent by (output started at .....</em></strong></p>
  
  <p>Is it really possible to write echo and header onto same page !!!</p>