how to data bind unique values from datatable columns as options to select2 boxes? Now all the values are bound.So same options are repeated.
select2::create(array(
"multiple"=>true,
"name"=>"تنتهيخلاليوم",
"placeholder"=>"select ",
"dataStore"=>$new,
"dataBind"=>array(
"text"=>"end_in_wd",
//all value from data table column "end_in_wd" as option -need only unique values
"value"=>"end_in_wd",
),
"attributes"=>array(
"class"=>"form-control"
)
));