Hi,
I have a very simple ( so I thought ) piece of code in PHP that needs to be modified to allow a Php var displayed in Json and sent.
Please look at the code below. When this is sent to the Json it works perfect.
// enter your site url here. We are using mywebsite.com as an example here
$data = '
{
"site_data":
{
"original_site_url":"http://www.mywebsite.com/"
}
}
';
$ch = curl_init();
Now, I want to replace the "Http://www.mywebsite.com/" using the var: $web
but when I do I get an error (see below).
Here is my change:
// enter your site url here.
$data = '
{
"site_data":
{
"original_site_url":"$web"
}
}
';
Error message part:
{"error_code":"InvalidInput","message":"Site url is not available [No Such URL: $web]."}Array (
Has anyone done this type of thing Php with Json?