Hi! Could we please enable some services and cookies to improve your experience and our website?

PHPize Online / SQLize Online  /  SQLtest Online

A A A
Login    Share code      Blog   FAQ

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

Copy Format Clear

Stuck with a problem? Got Error? Ask AI support!

Copy Clear
Copy Format Clear
<?php printf("Current PHP version: %s \n", phpversion()); $billingAddr = array( "supplement" => $billingAddress["streetDetails"], "street" => $billingAddress["street"], "zip" => $billingAddress["zipCode"], "city" => $billingAddress["city"], "countryCode" => $billingAddress["country"], ); $params = [ "version" => 0, "roles" => $roles, "person" => $person, "emailAddresses" => $emailAddresses, "addresses" => [ "billing" => $billingAddr ] ]; echo "Before JSON change:\n\n"; echo json_encode($params, JSON_PRETTY_PRINT); $billingAddr = array( "supplement" => $billingAddress["streetDetails"], "street" => $billingAddress["street"], "zip" => $billingAddress["zipCode"], "city" => $billingAddress["city"], "countryCode" => $billingAddress["country"], ); $params = [ "version" => 0, "roles" => $roles, "person" => $person, "emailAddresses" => $emailAddresses, "addresses" => [ "billing" => [$billingAddr] ] ]; echo "\n\nAfter JSON change:\n\n"; echo json_encode($params, JSON_PRETTY_PRINT);
Copy Clear