Checking if string contains “HTTP://”

stackofcodes.in

if( strpos($websiteLink, “http://”) !== false ||
strpos($websiteLink, “https://”) !== false){
$websiteLink  = $val[‘website’];
}else{
$websiteLink  = ‘http://’.$val[‘website’];
}

Leave a Reply

Your email address will not be published. Required fields are marked *