PHP inlineHook proxyAddresses

Hello - I am trying to get PHP code to use the inlineHook. I’m having a problem with proxyAddresses - if I comment it out, Okta is happy with my response.
My PHP code is like:
$proxyArray = array (
array(
“type” => “SMTP”,
“value” => “$emailAddress”
),
array(
“type” => “SIP”,
“value” => “$emailAddress”
)
);
$proxyArrayJSON = json_encode($proxyArray);
I then have: $hook->updateProfile(“proxyAddresses”, “$proxyArrayJSON”);
($hook is using Dragos PHP ImportInlineHook.php)

$emailAddress is valid and set to a value such as john.smith@test.com.
We are using the ImportInlineHook.php class that an Okta staff person created.

  1. Is my format for the proxy address correct?
  2. The json_encode adds backslashes to the JSON for double-quotes. ". I see these with Postman.

In case this helps anyone else, here is a simple solution that works:
$smtp = “SMTP:$emailAddress”;
$sip = “SIP:$emailAddress”;
$proxyArray = array($smtp,$sip);

        $hook->updateProfile("proxyAddresses", $proxyArray);

Okta is expecting a value like: “proxyAddresses”:[“SMTP:bob.smith@test.com”, “SIP:bob.smith@test.com”]