Can you explain something to me? When I use basename in the beginning of the script I get the folder name, which is what I am looking for. But when I use, dirname, I get the whole path which isn't what I am looking for. All I am looking for is the parent directory. Also, I set the variable $dir_new to display the directory, why won't it pass when I enter the function?
As much as I am trying to learn, I have gotten so fustrated, that I much rather just pass the variable into the function and not know why it works.