Jump to content

Trim string to .


aeboi80

Recommended Posts

I need to do two things.

 

I have  a string called $domain which contains a domain name.  What I need to do is know the domain name and also the domain extension.

 

So for example lets let $domainName = mydomain.com

I need to trim it to the . and store mydomain in $domain and then store com in $tld

 

Make sense?  I thought I had to explode $domainName somehow but I just can figure this out.

 

Thanks :)

Link to comment
https://forums.phpfreaks.com/topic/198976-trim-string-to/
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.