I am coding a site that has lengthy HTML for the user navigation system (tabs) on each page. Not a styling issue (all CSS is in another file) but the navigation has a lot of options.
I would like to have a php file which accepts the current page as an arg, sets up one string with all the HTML for the navigation system according to the current page and returns that one string. Then I would of course include the file in all pages and call the function in one line, echo it and be done with it.
Is this bad style? Is there a better way to do it? Should I look out for any potential problems (other than replacing double quotes with single quotes)?
Thanks.