title: Php curl and serialize problem
body: <p>In order to pass array variables via my curl script, I am using <code>serialize</code> because curl POST elements must not be arrays.</p>
  
  <p>The string that I get after serialization is:</p>
  
  <pre><code>a:10:{s:8:"question";s:18:"How are you doing?";s:11:"view_option";s:6:"select";s:10:"txt_answer";a:4:{i:0;s:8:"dsadsdsa";i:1;s:5:"dsads";i:2;s:10:"dsadsdsdsa";i:3;s:0:"";}s:4:"next";s:1:"9";s:7:"bgimage";s:0:"";s:9:"bck_color";s:0:"";s:12:"border_color";s:0:"";s:11:"select_font";s:1:"1";s:9:"font_size";s:4:"12px";s:4:"poll";s:9:"Get Poll!";} 
  </code></pre>
  
  <p>Curl makes it:</p>
  
  <pre><code>a:10:{s:8:\"question\";s:18:\"How are you doing?\";s:11:\"view_option\";s:6:\"select\";s:10:\"txt_answer\";a:4:{i:0;s:8:\"dsadsdsa\";i:1;s:5:\"dsads\";i:2;s:10:\"dsadsdsdsa\";i:3;s:0:\"\";}s:4:\"next\";s:1:\"9\";s:7:\"bgimage\";s:0:\"\";s:9:\"bck_color\";s:0:\"\";s:12:\"border_color\";s:0:\"\";s:11:\"select_font\";s:1:\"1\";s:9:\"font_size\";s:4:\"12px\";s:4:\"poll\";s:9:\"Get Poll!\";}
  </code></pre>
  
  <p>before sending to the server. Above is what I see at the server end. Now, because of the backslashes, above is <em>not</em> unserializable.</p>
  
  <p>What do I do now? If I just unescape all quotes - how do I distinguish between escapes put by CURL and escapes that could be part of the data?</p>
  
  <hr>
  
  <h2>EDIT</h2>
  
  <p>The error I get when trying to unserialize the escaped string is:</p>
  
  <p><code>Notice: unserialize() [function.unserialize]: Error at offset 304 of 351 bytes in /var/www/localserver/test/ser.php on line 8</code></p>
  
  <p>thanks</p>
  
  <p>JP</p>