I have a function name stored in my db but I get a syntax error when I try calling it.
$downloads = $wpdb->get_results( "SELECT function_name FROM master_download" );
foreach( $downloads as $download ) :
$function_name = $download->function_name;
eval( $function_name );
endforeach;
Value in db is:
csv_upload_measure_custom( $cell, $measure, $measure_start, $measure_end, $loc_id )
Error code:
Parse error: syntax error, unexpected end of file in /nas/content/staging/justreport/wp-content/themes/yardstick/template-data.php(373) : eval()'d code on line 1
Please can someone help me with what I am doing wrong?