title: How to scan entire line in php?
body: <p>I'm trying to scan an entire line but my code takes only the first character and then jumps to the next line. Here is what I'm trying to do:</p>
  
  <pre><code>&lt;?php
  $n_matrix_val=4;
  for ($y = 1; $y &lt;= $n_matricx_val; $y++) {
     fscanf(STDIN ,"%s\n", $the_matricx_val);
     fwrite(STDOUT, $the_matricx_val);
  }
  </code></pre>
  
  <p>My input is: </p>
  
  <pre><code>5 8 9 7
  3 4 9 8
  1 5 4 9
  3 2 7 6
  </code></pre>
  
  <p>and my out put is:</p>
  
  <pre><code>5313
  </code></pre>
  
  <p>I'm very new at this I'm trying solve small problems please help</p>