[Solved] parse and sort links [closed]
You can do it just by extracting the domain and using it as index for an array with the encrypted values, like so: $url=$_POST[‘url’]; $url=nl2br($url); $url=explode(“<br />”,$url); $urls = array(); foreach ($url as $value ){ $arr = explode(‘www.’,$value); $encrypt = md5($value); $urls[$arr[1]][]= $encrypt; //this line now fixed, had an error } foreach($urls as $key => … Read more