title: Why is there: Warning: printf(): Too few arguments on line 59
body: <p>I get an error in my php code when trying to get all the files from their directory, then creating html  links for them and I don't understand why.</p>
  
  <p>Here is the error:
  Warning: printf(): Too few arguments in C:\Users\Ryan\Documents\Web Development\xampp\htdocs\muzik\player.php on line 59</p>
  
  <p>Line 59 is:
      <code>printf("&lt;li&gt;&lt;a href='mp3/%s'&gt;%s&lt;/a&gt;&lt;/li&gt;", htmlentities($file-&gt;getBasename()));</code></p>
  
  <p>Here is the code:</p>
  
  <pre><code>`echo '&lt;ul id="playlist"&gt;';
  foreach( new DirectoryIterator('mp3/') as $file) {
      if( $file-&gt;isFile() === TRUE) {
          printf("&lt;li&gt;&lt;a href='mp3/%s'&gt;%s&lt;/a&gt;&lt;/li&gt;", htmlentities($file-&gt;getBasename()));
      }
  }
  echo '&lt;/ul&gt;';`
  </code></pre>