- print_r: documentation ( source)
- json_encode: documentation ( source)
<pre><?php
$x = [
'email' => 'test@esky.pl',
'list_id' => 100,
'additional' => 'pipe=separated|additional=values|system=iOS|system version=10.0 RC'
];
print_r(json_encode($x));
$x = [
'email' => 'test@esky.pl',
'id' => 100,
'additional_data' => [
'system' => 'iOS',
'system version' => '10.0 RC'
]];
print_r(json_encode($x));