Seems like you want to convert String to JavaScript Array. Take a look for Example;
$myRowFromTable="K04, K84, K53, K331, L985";
// Has Array Data
$ex = explode (', ', $myRowFromTable);
// print_r($ex);
// According to User Expected Result
$newFormat = "['" . implode("', '", $ex) . "']";
echo $newFormat;
1
solved How to explode row in table? [closed]