I have an array after dd() in php it show like this array:
1 [▼0 => "1,18,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,19,20,21,22,23,24"]
now I want to loop the array and pass only those values which are more than 200. Here is the code
$('#btnSave').on('click', function () {
var checkedIds = mytree.getCheckedNodes();
$('#userData').val(checkedIds);
});
where #userData is a hidden field and checkedIds has the above values.
How to loop and make a condition to assign only the desired values to #userData
phptag is redundant here.explodeandarray_filter.