text: 20145/removing-double-quotes-from-string-from-json-response-in-php
  I am using this code that I got from git, and when I get the BlockChain API response while getting the address from the wallet, the address is enclosed in double quotes like below.
  "43Hua8Qz1dj82ddoyLBe448HAXShsuBCAp"
  I want to remove these double quotes because it might create syntax errors. But I am not sure how to do it. Please help
  This is the code I am using:
  $resp = file_get_contents($blockchain_receive_root . "v2/receive?key=" . $my_api_key . "&gap_limit=".$gap_limit. "&callback=" . urlencode($callback_url) . "&xpub=" . $my_xpub);
  $response = json_decode($resp);
  print json_encode($response->address);
  How to remove the quotes?
  Why are you using json_encode?
  Just remove the json_encode call, and it should work:
  $resp = file_get_contents($blockchain_receive_root . "v2/receive?key=" . $my_api_key . "&gap_limit=".$gap_limit. "&callback=" . urlencode($callback_url) . "&xpub=" . $my_xpub);
  $response = json_decode($resp);
  print $response->address;
  Hey, thanks for the solution. Can you please tell what json_encode does?
  json_encode is a PHP function that is used to convert PHP objects to Json object. So when you use json_encode, the PHP object is getting converted to Json object and that's why you are seeing double quotes.
  You are getting double quotes because the line json_encode is encoded it into an address and that's why you can double quotes when you print it. If you don't use the encoding, it should be fine.
  You can use the replace method to replace the double quotes with nothing. Here's the code to do that.
  var test = "\"43Hua8Qz1dj82ddoyLBe448HAXShsuBCAp\"";
  console.log(test);
  console.log(test.replace(/\"/g, ""));
  Convert the json-string to a php-array and ...READ MORE
  Hyperledger Fabric supports only 2 types of ...READ MORE
  You can use btoa() and atob(). btoa() is like base64_encode() and atob() like base64_decode().
  Here is an example:
  btoa('Some ...READ MORE
  You should be aware of the chances ...READ MORE
  Convert the recipes into JSON objects.
  x = ...READ MORE
  The following code should help:
  $address = null;
  try ...READ MORE
  This should work:
  #!/usr/bin/env python
  import getpass
  import json
  import requests ...READ MORE
  I am implementing blockchain.info wallet api to ...READ MORE
  Hey buddy,
  this works:
  /**
  * Track temperatures ...READ MORE
  You need to remove the colon:
  list.select(&valid_transaction)
  The & ...READ MORE
  OR