I have to post values having single quote inside the string to a url using curl
, single quote automatically stripped I think, how do I properly include single quote in strings while using curl
,
$url = "test.com/req?a=10&b='1010','1012'";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
curl_close($ch);