Answers for "remove https and www from url php string"

PHP
1

remove http / https from link php

function remove_http($url) {
   $disallowed = array('http://', 'https://');
   foreach($disallowed as $d) {
      if(strpos($url, $d) === 0) {
         return str_replace($d, '', $url);
      }
   }
   return $url;
}
Posted by: Guest on December-10-2020

Code answers related to "remove https and www from url php string"

Browse Popular Code Answers by Language