remove http 2f https from link php

Solutions on MaxInterview for remove http 2f https from link php by the best coders in the world

showing results for - "remove http 2f https from link php"
Mae
03 Sep 2018
1function remove_http($url) {
2   $disallowed = array('http://', 'https://');
3   foreach($disallowed as $d) {
4      if(strpos($url, $d) === 0) {
5         return str_replace($d, '', $url);
6      }
7   }
8   return $url;
9}