title: overwriting column with fputcsv
body: <p>I want to parse, process and then overwrite only 1 specific column in a csv file, I'm fine with the first two steps but am having issues with the third. Here's what I have so far:</p>
  
  <pre><code>&lt;?php
  $fh = fopen("data.csv", "r");
  $row = 1;
  while (($data = fgetcsv($fh, 1024, ",")) !== FALSE) {
  $get = $data[2];
  $uc = ucwords(strtoupper($get));
  echo $uc;
  }
  ?&gt;
  </code></pre>
  
  <p>That displays fine, I just need the processed content to be written back into it's original column. I know this is done with fputcsv, but I can't seem to get it to work:</p>
  
  <pre><code>$fp = fopen('data.csv', 'w');
  fputcsv($fp, $uc, ",");
  fclose($fp); 
  </code></pre>
  
  <p>That just wipes the entire file. Same thing when using fwrite. Any ideas?</p>
  
  <p>Thanks.</p>