pooker Posted July 5, 2008 Share Posted July 5, 2008 I have a function menu() in a script I need to use on another script. The problem is I need the function menu and only menu so I cannot use include(file.php) then call the function because it will mess up the way it looks. Is it possible just to call a php function from a script and nothing else? Thanks Link to comment https://forums.phpfreaks.com/topic/113291-just-call-a-php-function-from-another-script/ Share on other sites More sharing options...
Lodius2000 Posted July 5, 2008 Share Posted July 5, 2008 make a third file with menu() defined in it, include in both files and call the function Link to comment https://forums.phpfreaks.com/topic/113291-just-call-a-php-function-from-another-script/#findComment-582078 Share on other sites More sharing options...
bluejay002 Posted July 5, 2008 Share Posted July 5, 2008 yeah, if a certain object is very much reused to other scripts, then you can create separate script for that. and reuse it whenever you want by calling the function name and place whereever you want it. Link to comment https://forums.phpfreaks.com/topic/113291-just-call-a-php-function-from-another-script/#findComment-582113 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.