Someone
public php v1 · immutable// loop through the link array, outputting the URL + Link Textfor ($i = 0; $i < sizeof($linkarray[0]); $i++){ echo ($linkarray[2][$i] . " - <a href=" . $linkarray[1][$i] . "> Link " . $i . "</a><br>"); $domain = $linkarray[1][$i]; // get host name from URLpreg_match("/^(http:\/\/)?([^\/]+)/i", $domain, $matches);$host = $matches[2];// get last two segments of host namepreg_match("/[^\.\/]+\.[^\.\/]+$/", $host, $matches);echo "domain name is: {$matches[0]}\n";