I want to organize my URLS so they are like this

```
url1.com
:url2.com
:url3.com

```

How can i check if its the last entry in the array to make sure it dosen't put a new line and a : after the last URL ?

```
foreach($urls as $url) {
        $splits .= "$url\n:";
    }

```