Just try with:
$input="stackoverflow.com";
if (strpos($input, 'www.') !== 0) {
$input="www." . $input;
}
2
solved Add www. if it’s not already in the string [closed]
Just try with:
$input="stackoverflow.com";
if (strpos($input, 'www.') !== 0) {
$input="www." . $input;
}
2
solved Add www. if it’s not already in the string [closed]