I am trying to post an array input to PHP through Javascript but when I print the posted array it does not show anything in the controller I am attaching my code below
submitHandler: function(form) {
$('input[name="val_profession_id[]"]').val();
}
any help is appreciable.
This is my array select box which i need to post through ajax to controller
<select class="select_box form-control" multiple="multiple" name="val_profession_id[]" id="val_profession_id">
</select>
and ajax code is :
val_profession_id = $('input[name="val_profession_id[]"]').val();