hi, i have the following function which is meant to look for instances of "." and if it's not present then stick ".com" on the end, but for some reason it's sticking ".com" on the end of everything, so some strings end up being "domain.com.com.com", etc - you get the idea if(strpos($domain, '.') !== false) $domain .= ".com"; PHP: any help appreciated. loads of thanks in advance! i have a 50usd adwords voucher which i don't need so you can have it if you can help out.
stripos() PHP: You misspelt it ? This is just an example of, one of the ways I use this function, based on your requirements. if (stripos($domain,".") !== false) // check if the DomainName has a . { // if it does do nothing } else { $domain = $domain,".com"; // so its DomainName.com } PHP:
are you sure? http://php.net/manual/en/function.strpos.php should just be the same but case sensitivity... but that shouldn't matter?