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';
$out = plain2json($in, ':');
echo $out;
    if ($in) {
        $prov['cfg_behavior'] = array_merge($prov['cfg_behavior'], XML2Array::createArray($in));
    }
    $in = '';
    if ($in) {
        $prov['cfg_base'] = XML2Array::createArray($in);
    }
    /* if you have more the 1 subselection add this seperatly */
    $in = '';
    if ($in) {
        $prov['cfg_base'] = array_merge($prov['cfg_base'], XML2Array::createArray($in));
    }
    $in = '';
    if ($in) {
        $prov['cfg_base'] = array_merge($prov['cfg_base'], XML2Array::createArray($in));
    }
    $in = '';
    if ($in) {
        $prov['cfg_tone'] = XML2Array::createArray($in);
    }
    $in = '';
    if ($in) {
        $prov['cfg_keys'] = XML2Array::createArray($in);
    }
    $prov['cfg_key'] = json_decode(plain2json($in, $del));
    $prov['pvt_generator'] = 'json2xml';
    $prov['pvt_counter'] = 1;
    $prov['pvt_type'] = 'provisioner';
    echo upload_phone_data($prov);
    unset($prov);
}