jQuery.getJSON( url [, data ] [, success ] )
$post_data = array(
'states' => ["Delivered"],
'date_begin' => $date_begin->format("d.m.Y 00:00:00"),
'date_end' => $date_end->format("d.m.Y 00:00:00")
);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
print_r(AllPermutations(array('peter', 'paul', 'mary')));
function AllPermutations($InArray, $InProcessedArray = array())
{
$ReturnArray = array();
foreach($InArray as $Key=>$value)
{
$CopyArray = $InProcessedArray;
$CopyArray[$Key] = $value;
$TempArray = array_diff_key($InArray, $CopyArray);
if (count($TempArray) == 0)
{
$ReturnArray[] = $CopyArray;
}
else
{
$ReturnArray = array_merge($ReturnArray, AllPermutations($TempArray, $CopyArray));
}
}
return $ReturnArray;
}
сохранять её значение на сервере до следующего запроса
$arr = explode(';', $string);
$output = [];
foreach ($arr as $item) {
list($key, $value) = explode('=', $item);
$output[$key] = $value;
}
var_dump($output);
$output = [];
array_map(function($item) use (&$output) {
list($key, $value) = explode('=', $item);
$output[$key] = $value;
}, explode(';', $string));