Welcome Guest, Not a member yet? Register   Sign In
how check method exist
#10

[eluser]Colin Williams[/eluser]
You are calling a function, so you need parenthesis

Code:
function index()
{
   $id=$this->uri->segment(3);
   if(method_exists($this,$id))
       $this->$id();
   else
       echo “Your method haven`t got”;
}


Messages In This Thread
how check method exist - by El Forum - 10-23-2008, 07:50 PM
how check method exist - by El Forum - 10-23-2008, 08:11 PM
how check method exist - by El Forum - 10-23-2008, 08:33 PM
how check method exist - by El Forum - 10-24-2008, 12:11 AM
how check method exist - by El Forum - 10-24-2008, 02:59 AM
how check method exist - by El Forum - 10-24-2008, 03:10 AM
how check method exist - by El Forum - 10-24-2008, 03:39 AM
how check method exist - by El Forum - 10-24-2008, 03:40 AM
how check method exist - by El Forum - 10-24-2008, 03:51 AM
how check method exist - by El Forum - 10-24-2008, 03:58 AM
how check method exist - by El Forum - 10-24-2008, 08:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB