title: Creating CSV with PHP
body: <p>I am attempting to create a dynamic csv file to export to a vendors site on my site. They want all values surrounded with double quotes. I am attempting to create the line then feed it to a fputcsv() but its coming out with a ton of double quotes when I view it in notepad2 and as 1 entry when viewing it in Excel. Here are my values:</p>
  
  <pre><code>$line = '"'.$row-&gt;petID.'","'.$row-&gt;customID.'","'.$row-&gt;petName.'","'.trim($row-&gt;breedName1).'","'.trim($row-&gt;breedName2).'","'.$df-&gt;setGender($row-&gt;gender).'","'.$df-&gt;setSize($row-&gt;size).'","'.$df-&gt;setAge($row-&gt;age).'","'.$description.'","'.$row-&gt;pType.'","'.$df-&gt;setStatus($row-&gt;status).'","","'.$row-&gt;isAltered.'","'.$ND.'","'.$NC.'","'.$NK.'","'.$df-&gt;isHousetrained($row-&gt;housebroken).'","'.$df-&gt;isDeclawed($row-&gt;declaw).'","'.$df-&gt;isSpecialNeeds($row-&gt;isSpecial).'","'.$df-&gt;isMix($row-&gt;breed2).'","'.$PhotoURL1.'","'.$PhotoURL2.'","'.$PhotoURL3.'"';
  </code></pre>
  
  <p>and it comes out like this using a text editor:
  """13651"","""",""jack"",""Chihuahua"",""Pomeranian"",""M"",""S"",""Baby"",""Jack and Jose were born to a cute 7lb Chihuahua/Pomeranian mix who was brought to the shelter as a stray.  they will be weaned for their new home mid August.Although the father is unknown, pups will most likely remain small.Please visit our website at www.dogswithoutborders.org for an online adoption application for either Jack or Jose and to learn more about our adoption fairs."",""Dog"",""A"","""",""0"","""","""","""","""","""","""",""1"",""<a href="http://photos.petfinder.com/photos/US/CA/CA1087/20460152/CA1087.20460152-1-x.jpg" rel="nofollow">http://photos.petfinder.com/photos/US/CA/CA1087/20460152/CA1087.20460152-1-x.jpg</a>"","""","""""</p>
  
  <p>When I remove the manually added "(s) I get only one in the beginning and one on the end. Any ideas?</p>