Wicky Posted May 10, 2007 Share Posted May 10, 2007 hello, i have a class am working on, its a datagrid class. In this datagrid i would like to able it to show form input fields like text boxes and check boxes during compile time by specifying a callback function to be called during compile time by smarty. In my class, i register the function using eval(function_string) when the user of the class chooses to show such columns. I got two questions -: 1) What is the best way to call a php function (which is in a class) during compile using smarty template (i am looking at ajax right now but not sure if there is an easier way). 2) Would the function exists if i use eval(function_string) to register it and then call it from another page without using eva(). For ex, i register a function like so eval("function _selector(){return "<input type blah blah>; }"); and then i use this function in another page called test_call_back.php like so. $value = $dataGrid->_selector(); instead of eval("$value=$datagrid->_selector()"); Will it prompt an error saying function does not exists or will it pass ? Thank you for ure help in advance, Bye Link to comment https://forums.phpfreaks.com/topic/50775-smarty-calling-php/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.