update
My code that works. When page is loaded
product= [[],[]];
then the code executed after ajax call:
$('#contextreload ul').each(function(i, ul) {
product.push([]);
});
$('#contextreload ul').each(function(i, ul) {
allline=i;
$('#reloadajax'+i+' li').each(function(lk, li) {
var lilk = $(li).html(); product[i][lk]=lilk;
// your code goes here
});
// your code goes here
});
To use eval(); in ajax response for this, with some changes in php file? /endupdate
product[0]=[1,2,3,4];
product[1]=[a,b,x,z];
.
.
product[10]=[extra,extra,extra,extra];
When I load the page this is executed: product= [[],[],[],[],[],[],[],[],[],[]];
But if I declare this, when I call ajax I can push add data only to this array (10 rows)
If I have 11 rows (product[10][0] and product[10][1]), the extra data will not be added.
After ajax call I need the extra data
: product= [[],[],[],[],[],[],[],[],[],[],**[11]**];
This function is because I want to put data in array after loading ajax data from php file.
$('#contextreload ul').each(function(i, ul) {
<strike> var product = $(ul).html(); </strike>
allline = i;
$('#reloadajax'+i+' li').each(function(lk, li) {
var lilk = $(li).html();
product[i][lk]=lilk;
alert(lilk+lk);
// your code goes here
});
// your code goes here
});
}
=[];then.pushto it in the loop as needed