Pass a variable through a function parameter
I'm trying to insert the output of "get_custom_field_value" into the id of the wp_table function开发者_Python百科.
My syntax must be wrong, because this isn't working.
$menu = get_custom_field_value('menu-id', true);
wp_table_reloaded_print_table( "id=$menu&use_tablesorter=true&print_name=false" );
try
$menu = get_custom_field_value('menu-id', true);
wp_table_reloaded_print_table( "id=" . $menu . "&use_tablesorter=true&print_name=false");
if this doesn't work yet, try to
print_r($menu);
to see, what menu looks like.
精彩评论