title: php generated semicolon delimited csv showing all values in one column
body: <p>I want to use different delimiters while generating CSV. When I try comma then it works fine means all values show in different columns but when I try other delimiters like ; or | then it shows all values in one column. Following code is showing all column's data in one column.</p>
  
  <pre><code>$csv_filename = $this-&gt;saveFileToDirectory.$this-&gt;fileName;
  $fp = fopen ($csv_filename, "w");
  fputcsv($fp, $this-&gt;headerArr);
  foreach ($this-&gt;data as $key =&gt; $value) {
      if(is_array($value)) {
          $csvData = $this-&gt;makeStringFromArr($value);
          fputcsv($fp, explode(";",$csvData),";");
      }
  }
  fclose($fp);
  </code></pre>
  
  <p>$csvData value is following</p>
  
  <blockquote>
    <p>"GUARANTEED AVAILABILITY;GUARANTEED AVAILABILITY;GUARANTEED
    AVAILABILITY;;my;GUARANTEED AVAILABILITY
    ;34.5;;BLUE;80463259;VERY_GOOD;H1078;N;sss;dummy value;GUARANTEED
    AVAILABILITY;&quot;14.50, 34.50&amp;Acirc ;&deg;, &quot;;GUARANTEED
    AVAILABILITY;sdf"</p>
  </blockquote>
  
  <p>If I replace following line then it does not show data in CSV</p>
  
  <pre><code>fputcsv($fp, $csvData,';');
  </code></pre>
  
  <p>Following is sample CSV</p>
  
  <p><a href="https://i.stack.imgur.com/7H6Rc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7H6Rc.png" alt="enter image description here"></a></p>
  
  <p>Any suggestion? What I am doing wrong or it is right and will be visible in one column when exported with other delimiters than comma? </p>