How can split field results with multiple values in PHP? -
i try split field multiple values, have field..
colors values separated |..
blue|yellow|green|white
function getautocomplete($term) { global $db; global $config_table_prefix; $result = $db->fetchrowlist("select `colors` ".table_colors." `colors` '$term%' limit 10"); //this code need code here split values return $result; }
i assume working php use function explode(), you'll array :
$result = explode("|", $result);
Comments
Post a Comment