how can get error message from josn?

Open in new window

Hamdan ShafiqPHP Full Stack DeveloperAsked:
Who is Participating?
Ryan ChongCommented:
the request returned with a json message:

[["ShipAddress is null"]]

Open in new window

you got to check the documentation what is mean by this json message.
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
This expert suggested creating a Gigs project.
This will take a good bit of work to figure out.

Someone will have to get into your CreateHWB.aspx code + determine what's wrong, how to raise exceptions, how best to pass them back to whatever consumers/code that uses this facility.

Likely best to open a Gig for fastest resolution.
Hamdan ShafiqPHP Full Stack DeveloperAuthor Commented:
 $ch = curl_init();
  $timeout = 0;
  curl_setopt ($ch, CURLOPT_URL, $url);
  curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);

  curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)");
  curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
  $response= curl_exec($ch);
  if (!$response){
  return $response;

Open in new window

Ryan ChongCommented:
if you mean to return the json content only, then you should try:

  $ar = json_decode($response);
  $rtn = $ar[0][0];
  return $rtn;

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.