title: sending an array through cURL POST
body: <p>Hi i am testing a scenario for REST web service for mobile app.During testing i need to send an array to my php programme using post method. which i am doing through cURL console. rest of the thing is working fine except passing an array. Please suggest any changes. </p>
  
  <p>following code i am passing in cURL console</p>
  
  <pre><code>C:\curlw32&gt;curl -H "Content-Type: application/json" -X POST http://localhost/slim-login/api/submit -d "{\"specialtyCheckbox\":\"[1,2,3]\"}"
  </code></pre>
  
  <p>and here is the php code for catching it </p>
  
  <pre><code>$request = Slim::getInstance()-&gt;request();
  $onsubmit_content = json_decode($request-&gt;getBody());
  $spec=$onsubmit_content-&gt;specialtyCheckbox;
  echo json_encode(count($spec));
  </code></pre>
  
  <p>Here the length of the array it is showing 1.</p>