<?php
$data = '{"name":"type[]","value":"radio"},{"name":"name[]","value":"radio naam 1"},{"name":"label[]","value":"radio label 1"},{"name":"placeholder[]","value":"radio placeholder 1"},{"name":"answer[]","value":"antwoord 1-1"},{"name":"answer[]","value":"antwoord 1-2"}';
$temp = [];
foreach (json_decode('[' . $data . ']') as $record) {
$temp[] = urlencode($record->name) . '=' . urlencode($record->value);
}
parse_str(implode('&', $temp), $result);
var_dump($result);
preferences:
25.93 ms | 408 KiB | 5 Q