title: Difference between cURL headers
body: <p>What is difference between below headers sent by cURL?</p>
  
  <pre><code>$header="POST /cgi-bin/webscr HTTP/1.1\r\n";
  $header .="Content-Type: application/x-www-form-urlencoded\r\n";
  $header .="Host: www.paypal.com\r\n";
  $header .="Connection: close\r\n\r\n";
  </code></pre>
  
  <p>And </p>
  
  <pre><code>$header = array ('POST /cgi-bin/webscr HTTP/1.1', 'Content-Type: application/x-www-form-urlencoded', 'Host: www.paypal.com', 'Connection: close');
  </code></pre>
  
  <p>Used for </p>
  
  <pre><code>curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
  </code></pre>
  
  <p>Can I use both methods for setting up headers for cURL?Thanks</p>