title: Adding a \n newline symbol when using sprintf in PHP
body: <p>I'm trying to export existing data from a MySQL database, into ruby commands I can run with <code>rake db:seed</code>.</p>
  
  <p>Here's my code.</p>
  
  <pre><code># Generate db:seed data for proveedores.
  $proveedores = R::findAll('tbproveedores');
  $proveedoresE = R::exportAll($proveedores);
  
  foreach ($proveedoresE as &amp;$p) {
  
      $line = 'BookSupplier.create(company: "%s", city: "%s", country: "%s", address: "%s", telephone: "%s", contact: "%s", email: "%s", website: "%s"\n';
      $exportedLine = sprintf($line, $p['empresa'], $p['ciudad'], $p['pais'], $p['direccion'], $p['telefono'], $p['personacontacto'], $p['email'], $p['website']);
      var_dump($exportedLine);
      fwrite($seeds, $exportedLine);
      echo "&lt;br /&gt;";
  }
  </code></pre>
  
  <p>Notice the <code>\n</code> newline symbol at the end of the $line variable. I read online that that was all that is needed to use a newline.</p>
  
  <p>The output of my code above is (<em>vertabim, a long line</em>):</p>
  
  <pre><code>BookSupplier.create(company: "Pearson", city: "Lima", country: "Peru", address: "Av. Limon", telephone: "4673535421", contact: "Javier", email: "", website: ""\nBookSupplier.create(company: "Project Management Institute - PMI", city: "Pennsylvania", country: "Estados Unidos", address: "Newtown Square, Pennsylvania", telephone: "1", contact: "Limberg Morales", email: "", website: "http://www.pmi.org/"\nBookSupplier.create(company: "UVirtual - Centro de Excelencia", city: "Santa Cruz", country: "Bolivia", address: "Av. Irala 585", telephone: "1", contact: "Limberg Morales", email: "", website: ""\nBookSupplier.create(company: "Ábaco de Rodolfo Depalma", city: "Buenos Aires", country: "Argentina", address: "Viamonte 1336, 4° (C1053 ACB) Buenos Aires", telephone: "5411-43711675", contact: "Limberg Morales", email: "", website: "http://www.abacoeditorial.com.ar/"\nBookSupplier.create(company: "Pablo Lledó - ProjectManagement", city: "Canadá", country: "Estados Unidos", address: "Victoria, BC, Canadá", telephone: "1", contact: "Limberg Morales", email: "", website: ""\n
  </code></pre>
  
  <p>I'd like each call to be in it's own line, following my newline insertion. Any suggestions on what I'm doing wrong?</p>