Fluf Posted October 13, 2007 Share Posted October 13, 2007 Hi, I have a lil problem. How can I use function in function like this function check() { echo "Fluf"; } function echo_data() { echo "My name is "; check(); // and then it should echo the name.. } Is it even possible in php5? Quote Link to comment https://forums.phpfreaks.com/topic/73069-function-in-function/ Share on other sites More sharing options...
MasterACE14 Posted October 13, 2007 Share Posted October 13, 2007 yep, of course it works Please try these things out before posting here : <?php function check() { echo "Fluf"; } function echo_data() { echo "My name is "; check(); // and then it should echo the name.. } echo_data(); ?> Regards ACE Quote Link to comment https://forums.phpfreaks.com/topic/73069-function-in-function/#findComment-368497 Share on other sites More sharing options...
ThYGrEaTCoDeR201 Posted October 13, 2007 Share Posted October 13, 2007 A function will also work inside a function as long as the function is defined. Quote Link to comment https://forums.phpfreaks.com/topic/73069-function-in-function/#findComment-368608 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.