Ive got a function on one PHP file which is: <?php $nav = '<div> <div align="center"> <script type="text/javascript" src="stmenu.js"></script> </head> <body> <script type="text/javascript"> ?> PHP: I need to echo this onto another php file. How do I do this?
I'm assuming you mean variable instead of function? The better way to do this I think would be to move variables (as well as functions) that will be used in multiple files and put them in a file called includes.php. Once you do that, if you intend on using them, just do <?php include('includes.php'); ?> and then you should be able to use that variable.