title: fgetcsv - Perform function on first column value?
body: <p>I have a csv with two rows.</p>
  
  <pre><code>if (($handle = fopen("twoRows.csv", "r")) !== FALSE) {
  while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
  print_r($data);
  </code></pre>
  
  <p>This returns two arrays with a line break at the end of the first array.</p>
  
  <p>If I want to access the first column, I do</p>
  
  <pre><code>echo $data[0];
  </code></pre>
  
  <p>And get</p>
  
  <pre><code>value1
  value2
  </code></pre>
  
  <p>Yet, if I do something like:</p>
  
  <pre><code>$data[0] = $post_ID;
  echo 'Post ID = ' . $post_ID . '&lt;br /&gt;';
  </code></pre>
  
  <p>I get zero output on $post_ID</p>
  
  <pre><code>Post ID =
  Post ID =
  </code></pre>
  
  <p>How can I perform a function on each first column value?</p>