Keyur Keyur - 3 months ago 50
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, "", "");