title: php Echo/printing a multiline string?
body: <p>i have a php file launching my exe. the exe does cout and the text is printed in html which is all fine. until i write "someline\n"; The \n breaks the output and i only see the last line. How do i print/echo text/strings that has multilines in them?</p>
  
  <p>The current paste has \n commented out and my text prints fine. It looks ugly in the console and when i view source with IE7 (although i primarily browse with FF) the source is painful to look at. Here is my current php and cpp file</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;?php
  echo( exec('c:/path/to/exe/launchMe.exe hey lol hi') );
  ?&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>cpp</p>
  
  <pre><code>#include &lt;string&gt;
  #include &lt;iostream&gt;
  #include &lt;sstream&gt;
  using namespace std;
  
  const string htmlLine(string s)
  {
      s+= "&lt;br /&gt;";
  //  s += "\n";
      return s;
  }
  
  int main(int argc, char *argv[])
  {
      stringstream s;
      s &lt;&lt; argc;
      cout &lt;&lt; htmlLine("woot") &lt;&lt; htmlLine(s.str());
      for (int i=0; i&lt;argc; ++i)
      {
          s.str("");
          s &lt;&lt; i &lt;&lt; " = " &lt;&lt; argv[i];
          cout &lt;&lt; htmlLine(s.str());
      }
      return 0;
  }
  </code></pre>