<?php
$array = [
'mc_gross' => 10.17,
'protection_eligibility' => 'Eligible',
'address_status' => 'unconfirmed',
'payer_id' => 'STTAC7UV2CVJ4'
];
$result = [];
foreach ($array as $key => $value) {
$result[str_replace('_', '', ucwords($key, '_'))] = $value;
}
var_export($result);
- Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.25, 8.4.1 - 8.4.12
- array (
'McGross' => 10.17,
'ProtectionEligibility' => 'Eligible',
'AddressStatus' => 'unconfirmed',
'PayerId' => 'STTAC7UV2CVJ4',
)
preferences:
91.05 ms | 407 KiB | 5 Q