MDanz Posted February 25, 2011 Share Posted February 25, 2011 can you do that with php? Database2() { function test($id) { $newdb = new Database2(); $newdb->test($id); } } Link to comment https://forums.phpfreaks.com/topic/228819-calling-the-same-function-from-within-that-function/ Share on other sites More sharing options...
samoht Posted February 25, 2011 Share Posted February 25, 2011 yes, but you need to define $id and you need to provide an excape from the function otherwise you'll be in an infinite loop. Link to comment https://forums.phpfreaks.com/topic/228819-calling-the-same-function-from-within-that-function/#findComment-1179640 Share on other sites More sharing options...
KevinM1 Posted February 25, 2011 Share Posted February 25, 2011 http://en.wikipedia.org/wiki/Recursion_%28computer_science%29 Link to comment https://forums.phpfreaks.com/topic/228819-calling-the-same-function-from-within-that-function/#findComment-1179641 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.