title: PHP reading fscanf
body: <p>I have been trying to read numbers from online course with given input as STDIN and my file is like this:</p>
  <pre><code>2
  3 15
  </code></pre>
  <p>I read the 2 and 3, how can I read 15?</p>
  <p>my code:</p>
  <pre><code>    &lt;?php
      /*
      // Sample code to perform I/O:
      
      fscanf(STDIN, &quot;%s\n&quot;, $name);           // Reading input from STDIN
      echo &quot;Hi, &quot;.$name.&quot;.\n&quot;;                // Writing output to STDOUT
      
      // Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail
      */
      
      // Write your code here
      fscanf(STDIN, &quot;%s\n&quot;, $amount);
      echo $amount . &quot;\n&quot;;
      for ($i = 0; $i &lt;= $amount; $i++)
  {
      fscanf(STDIN, &quot;%s&quot;, $x);
      echo $x . &quot;\n&quot;;
  }
      ?&gt;
  </code></pre>
  <p>My output now is: 2 3 3 and I want 2 3 15</p>