Using Friendly URL’s for making decisons I used to do this in about 6 lines. $urlValues = explode(“/”, trim($_SERVER[‘SCRIPT_URL’], “/”));