//Do db insert $arr = array('val1','val2'); $string = implode(',',$arr); //Do db retrieve $arr = explode(',',$string);