Can someone please help me with the right code to do this.
Like in WHM/cPanel I need to take a domain name out of my database and create the username the will be the first 8 characters of the domain name.
e.g. thisismydomain.com would be thisismy
But if there is a dot (.) then the dote has to be taken out but still make up a 8 character username.
e.g. theabc.com would be theabcco
And at the same time if there isn't 8 characters it just uses the total amount there.
e.g. abc.com would be abccom
Thanks for any help.