Why is this array with empty value even though it has nothing filled?
class URLDynamic {
private $Parametro;
private $SepURL;
private function SetParametro() {
if ( isset ( $_GET['url'] ) ) {
$this->Parametro = addslashes ( rtrim ( $_GET['url'] ) );
$this->SepURL = explode ( "/", $this->Parametro );
}
}
private function SetPages() {
$this->SetParametro();
if ( isset ( $this->SepURL[0] ) ) {
echo $this->SepURL[0];
} else {
echo "Home";
}
}
var_dump ( $this->SepURL );
array(1) { [0]=> string(0) "" }
It's not falling on the else