title: Not printing the last value from ECHO PHP
body: <p>the problem is I need to print the value coming from fgets(STDIN), in the follow manner:</p>
  <pre><code>INPUT - STRING
  OUTPUT  ++++++++
          +STRING+
          ++++++++
  </code></pre>
  <p>Unlucky I had stuck, please check my code:</p>
  <pre><code>&lt;?php
      echo &quot;start!!\n&quot;;
      $input_line = fgets(STDIN);
      $input_nobreaks = str_replace(&quot;\n&quot;,&quot;&quot;,$input_line);
      $length = strlen($input_nobreaks);
      $x=&quot;+&quot;;
      
      for ($i = 0; $i &lt; ($length + 1); $i++) {
          echo $x;
      }
      echo &quot;\n&quot;;
      echo $x,$input_nobreaks,$x;
      echo &quot;\n&quot;;
      
      for ($i = 0; $i &lt; ($length + 1); $i++) {
          echo $x;
      }
      //echo &quot;\n&quot;.$input_nobreaks;
      echo &quot;\nend!!&quot;;
  ?&gt;
  
  </code></pre>
  <p>Thank you for sharing your wisdom.</p>