Menu
$curr_loc = $_SERVER[‘PHP_SELF’];
$root_array = explode(‘/’, $curr_loc);
echo $root_array[0];
The idea is that I find the current location and seperate the parts by “/”. I would then go through the array and see if anything is there beyond the actual page I was on, and if so, I could use it to find the current folder I am using and for other stuff. Currently, the last line returns nothing even though I am looking at a page in a subfolder.