Here I create english array, so I can use it in another function.
var englsih = [];
$('#get_test').click(function() {
$.post('ajax-request.php', {
act: 'start_test'
}, function(data) {
var jstring = $.parseJSON(data);
english = jstring.english_word;
Problem is to save in this array JSON data, and then use it in other places.
$(document).on('submit', '#quiz_form', function() {
alert(englsih.length);
});
This alert shows me 0 length, though it should be 5 (MySql returns 5 objects).