public static function dataExplodeKeyValue($string) { $return = []; if (false !== strpos($string, ':')) { $strpos = strpos($string, ':'); $before = substr($string, 0, $strpos); $after = substr($string, $strpos + 1, strlen($string)); $return[trim($before)] = HelperData::dataExplodeKeyValue($after); } else { $return = trim($string); } return $return; }