$opt = $vi->field->options; if($opt){ $opt = unserialize($opt); print_r($opt); if(is_array($opt)){ $rt = $opt['rt']; $rt_column = $opt['column']; if($rt && $rt_column){ $ret = 'r_'.$k; echo $rt_column; $value = $post->$ret->$rt_column; } } }
protected static $_observers = array( 'Orm\\Observer_Self' => array( 'before_save', 'after_load', ), ); public function _event_before_save(){ if($this->rules) $this->rules = json_encode($this->rules); } public function _event_after_load(){ $this->rules = json_decode(json_decode($this->rules),true); }may be not good
It looks like you're new here. If you want to get involved, click one of these buttons!