Remove domain extension

conlele

New Member
So let's say I have \[code\]just-a.domain.com,just-a-domain.info,just.a-domain.net\[/code\] how can I remove the extension \[code\].com,.net.info ...\[/code\] and I need the resultes in two variables one with the domain name and another one with the extension.I tried with \[code\]str_replace\[/code\] but doesn't work, I guess only with regex....where I'm a noob.Can someone please help me?
 
Back
Top