The split would return an array of strings itself, if that is the question.
http://php.net/manual/en/function.split.php
Edit:
Adding a more detailed answer:
<?php
$divisi = "ITD, ITO, Keuangan, Sumber Daya Manusia";
$selectedValues = array();
$selectedValues = split(",", $divisi);
var_dump($selectedValues)
?>
The script above returns the below array when run on http://phpfiddle.org/
array(4) { [0]=> string(3) "ITD" [1]=> string(4) " ITO" [2]=> string(9) " Keuangan" [3]=> string(20) " Sumber Daya Manusia" }
As pointed out split
is deprecated: http://php.net/manual/en/function.split.php. Please use explode
or str_split
Also your code looks like it is JavaScript and not proper PHP. So take care of that.