Reputation: 972
Why does this not remove the example/
:
$url = "http://webserver/exmaple/subdomaine/";
$domaine="example"
$domaine= $domaine."/";
echo str_replace($domaine,"",$url);
Is there a better way to do so ?
Thanks!
Upvotes: 0
Views: 55
Reputation: 2783
did a mistake here
$domaine="example"
replace it by
$domaine="example";
Upvotes: 0
Reputation: 78994
Check spelling:
exmaple
!== example
exmaple would be a tree that was a maple in the past but is now another type of tree such as an oak or yew.
Upvotes: 0