次のようにphp関数から返されたデータがあります:
data[0]
[0]
<table>
....
</table>
[1]
<table>
....
</table>
.
.
.etc
data[1]
javascript でこの配列をループするにはどうすればよいですか !
次のようにphp関数から返されたデータがあります:
data[0]
[0]
<table>
....
</table>
[1]
<table>
....
</table>
.
.
.etc
data[1]
javascript でこの配列をループするにはどうすればよいですか !
ネストされたjQuery foreach 関数を持つことが可能です。
$.each(data, function(key, value) {
//this is each data... data[0], data[1]... etc, the value being value and the index being key.
$.each(key, function(innerKey, innerValue){
//this is where your tables are. innerKey being the index innerValue being the value.
<table>
...
</table>
});
});