Hi,
there are three problems:
1) the ":', ':" with the space after the , will have an affect on the sort because the space will be included in the sort
2) same for the '
3) same for the :
This should work:
<?PHP
$users=":alex::blubb::alex2:";
$xusermatch = str_replace("::",",",$users);
$xusermatch = str_replace(":","",$xusermatch);
//$xusermatch = eregi_replace("::", ":,:", $users);
//$xusermatch = eregi_replace("^:", "", $xusermatch);
//$xusermatch = eregi_replace(":$", "", $xusermatch);
//$xusermatch = str_replace(":","",$xusermatch);
echo"$xusermatch<br>";
$arrUsermatch = explode(",",$xusermatch);
asort($arrUsermatch);
reset($arrUsermatch);
echo implode(",",$arrUsermatch);
// now populate the select
?>