$value) { setcookie('pdf_' . $key, $value, time() - (86400 * 30)); $param .= "$key=$value&"; } //print_r($_COOKIE); //$json['url'] = 'pdf/special_government/' . $param . '/'; $json['url'] = 'excel/disciplinary-action-monthin/' . $param . '/'; echo json_encode($json);