Welcome Guest, Not a member yet? Register   Sign In
using varibales as a function name
#1

[eluser]A.M.F[/eluser]
hello,

i am using a foreach loop to show several functions. so i want to do it something like this:

Code:
foreach($fields as $k=>$v)
{
     echo $this->validation->$v[0]._error;
}

but this is the message i get:
Quote:Message: Use of undefined constant _error - assumed '_error

why?


Messages In This Thread
using varibales as a function name - by El Forum - 12-13-2007, 10:41 AM
using varibales as a function name - by El Forum - 12-13-2007, 10:53 AM
using varibales as a function name - by El Forum - 12-13-2007, 11:31 AM
using varibales as a function name - by El Forum - 12-13-2007, 02:19 PM



Theme © iAndrew 2016 - Forum software by © MyBB