0
例子:PHPJS”和array_diff返回undefined
我试图使用array_diff
功能从PHPJS,检查所有内部selectedFeatures
的元素在里面elem.features
发现,但是我收到undefined
。是什么赋予了?
$(markers.houses).each(function(index, elem) {
//first filter by selected features
console.log(array_diff(elem.features, selectedFeatures).length);
if (array_diff(selectedFeatures, elem.features).length == 0) {
if (!markers.houseMarkers[index].visible) {
markers.houseMarkers[index].setVisible(true);
}
}
});