Keyur Keyur - 6 months ago 72
PHP Question

remove http and https from string in php

I have several urls like,

I only want "" as string

And I want to remove the

https:// and http://

So I have taken array like this,

$removeChar = ["https://", "http://", "/"];

What is the proper way to remove these?


This worked for me,

$http_referer = str_replace($removeChar, "", "");