the code below sets $number to anyting that is after the / of my domain, (http://mydomain.com/1) i wonder how i can make it so that if there is nothing after the / $number automaticlly is set to 1.

$number = basename('http://'.$_SERVER['HTTP_HOST'].($_SERVER['REQUEST_URI'] == '/' ? 1 : $_SERVER['REQUEST_URI']));