Hi I' using zend as my framework, which i've got a problem, what i want to do is ill get the crit base on the get_param then the id is the modelname which i'll append to this command " new Model_Select_.'$table'.(); " as all of my models have the same ane format ony changing their tablename . but it'll give me the error "Parse error: syntax error, unexpected ')" can anyone help me through this? $table = $this->_getParam('crit'); $curr_model = new Model_Select_.'$table'.(); //it will not accept this $this->view->table = $curr_model->fetchAll(); PHP: i tried storing the statement as $string = " new Model_Select_.'$table'.();"; $curr_model = $string; PHP: but the result is the statement was read as a string instead of processing the action, i tried the eval() code but its not working $curr_model = eval("new Model_Select_".$table."();"); Code (markup): thanks
$table = $this->_getParam('crit'); [B]$string = " \$curr_model = new Model_Select_{$table}();";[/B] eval($string); $this->view->table = $curr_model->fetchAll(); Code (markup):