Welcome Guest, Not a member yet? Register   Sign In
changing a collection into an array
#1

I am running the code below. I thought that json_output would hold an array of the data, but instead it gets NULL. Why? 
 $stripe = new \Stripe\StripeClient($_SESSION['STRIPE_SECRET_KEY']);
        $js = $stripe->customers->all(['email' => $_SESSION['userid']]);
        $json_output=json_decode($js,true);

        $cust_id = $json_output->lastResponse->json->data[0]->id;
        $_SESSION['stripe_customer_number'] = $cust_id;
$cust_id also gets NULL.
proof that an old dog can learn new tricks
Reply


Messages In This Thread
changing a collection into an array - by richb201 - 10-06-2022, 01:07 PM



Theme © iAndrew 2016 - Forum software by © MyBB