I want to cocatenate variable in curl code,How can i do this ? I tried with following code but not working for me,Here is my code
$id = $_POST['id'];
$type = $_POST['type'];
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://xxxxxxxxxxx.com",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_POSTFIELDS => "{\"id\":$id,\"type\":\.$type}}",
);