Im working on this DUDAMOBILE API. Custom integration in PHP website. first it takes URL from customer.
$url = $_POST["url"]
and i want to assign this url in below code
$data = '
{
"site_data":
{
"original_site_url":"http://www.test.com/"
}
}
';
but not sure how to assign it to above code. i tried like this. but it doesn't work
$data = '
{
"site_data":
{
"original_site_url":'.$url.'
}
}
';
im getting this error
Failed to parse JSON: Unexpected character ('h' (code 104))