Rozamunda
asked on
pointers to static methods
Hi, I defined pointers to 3 different static methods
each of those function requires a parameter. however when i call $crtrow($row)
i am getting an error that function
DD::cuctrow() requires parameter, which I am passing
if ($cond1)
$crtrow = function () { return DD::cuctrowch(); };
if ($cond2)
$crtrow = function () { return DD::cuctrow(); };
if ($cond3)
$crtrow = function () { return DD::cuctrowp(); };
class DD
static function cuctrow($row)
{
}
static function cuctrow($row)
{
}
..
..
}
each of those function requires a parameter. however when i call $crtrow($row)
i am getting an error that function
DD::cuctrow() requires parameter, which I am passing
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
In short, instead of "function ()..." try "function ($row)...".
...and you'll also need to pass that parameter.
e.g.
Open in new window