I have some problem with Explode function.
public function parseUrl()
{
if(isset($_GET['url'])){
$tmp = filter_var(rtrim($_GET['url'],'/'), FILTER_SANITIZE_URL);
return $url = explode('/', $tmp);
}
}
If i'm using this this isn't working but if i do this
public function parseUrl()
{
if(isset($_GET['url'])){
//$tmp = filter_var(rtrim($_GET['url'],'/'), FILTER_SANITIZE_URL);
return $url = explode('/', filter_var(rtrim($_GET['url'],'/'), FILTER_SANITIZE_URL));
}
}
This works fine can anyone explain what is the problem if I'm using one more variable in Explode function