$('button[id="searchBtn"]').on('click', function () {
....
var lang;
$.getJSON(
'core/lang.php', {
word: $('input[id="searchInput"]').val()
},
function (data) {
var result = JSON.parse(data);
lang = result['lang'];
$.get(
'core/search.php', {
word: $('input[id="searchInput"]').val(),
lang: lang
},
function (data) {
result = JSON.parse(data);
console.log(result);
},
);
}
);
});
$date = new \DateTime('now');
echo $date->modify('+1 month')->format('M');