Closed (fixed)
Project:
Magic Tabs
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
10 Dec 2008 at 06:44 UTC
Updated:
11 May 2009 at 21:51 UTC
in the example below, how do i pass parameters to magic_tabs_example_callback() via magic_tabs_get?
...
print magic_tabs_get('magic_tabs_example_callback');
...
function magic_tabs_example_callback($active = 0, $a1, $a2)
{
...
}
BTW, the example causes error, warning: Missing argument 2 for magic_tabs_example_callback() in D:\Apache2.2\htdocs\d66\sites\all\modules\magic_tabs\magic_tabs.module on line 260.
I actually want to pass values to $a1, $a2, but don't know how.
Thanks!
Comments
Comment #1
newbuntu commentedI sort of got it working. I don't know if this is the intended way to do it:
Comment #2
dawehnerthis is the exact way to do it.
you can pass as many arguments to the function as you want, thats the power of call_user_func_array
Comment #4
tommytom commentedhow can I pass %nid argument to the view ??