scrubbicus Posted May 14, 2009 Share Posted May 14, 2009 So I'm trying to make my function calling dynamic. Like for instance public function getModule($type) { self::get{$type}(); } BUt that doesnt work so for instance if I put in for $type = articles then this function will call self::getarticles(); Link to comment https://forums.phpfreaks.com/topic/158162-calling-variables-while-calling-a-function/ Share on other sites More sharing options...
Axeia Posted May 14, 2009 Share Posted May 14, 2009 Wouldn't it have to be {'get'.$type} ? Link to comment https://forums.phpfreaks.com/topic/158162-calling-variables-while-calling-a-function/#findComment-834274 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.