Answers for "how to remove https and http any url in php"

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 "how to remove https and http any url in php"

Browse Popular Code Answers by Language