Okay, this amends a previous thread I started about php and includes.
I think people misunderstood what I was trying to do, so a bit more of an explanation here.
I am looking for a php solution to a javascript set up I was using.
formerly, all the menus (9) are in one javascript. The menus are written once, then dir depth function tells the script to add ../ to image or url paths so that no matter how far you go down the menu works.
I wanted to switch to includes using php. so now, at root level I have 9 versions of the menu, one for each category, because when you are in each category there is an image change, one highlighted to remind the user where they are.
If I use the php includes, as they are, I would have to duplicate all nine menus for three additional sub levels for a total of 36 includes. Thats heavy maintanence and that's not an option.
With the old javascript recipe I only have 9 scripts to maintain when there are changes.
So what I want to know, is this...is there a way to get a script to add ../ to the root file paths when the files are .inc (php) includes. I tried to use the old javascript function, dir depth, perhaps inappropriately as it does not work.
Is there a solution to my delimma or do I need to forget about php and go back to javascript?
Katherine