$value = @trim($value, ','); if ($value && is_string($value)) {$query = $this->ci->db->query('select id,title,url,thumb from '.$this->ci->db->dbprefix(SITE_ID.'_'.$module).' where id IN ('.$value.') order by instr("'.$value.'", id)')->result_array();foreach ($query as $t) {$id = $t['id'];$value = ''.$t['thumb'].'';$str.= str_replace(array('{id}', '{value}'), array($id, $value), $tpl);}}$str.= '';$str.= '
';
$value = @trim($value, ','); if ($value && is_string($value)) { $query = $this->ci->db->query('select id,title,url,thumb from '.$this->ci->db->dbprefix(SITE_ID.'_'.$module).' where id IN ('.$value.') order by instr("'.$value.'", id)')->result_array(); foreach ($query as $t) { $id = $t['id']; $value = ''.$t['thumb'].''; $str.= str_replace(array('{id}', '{value}'), array($id, $value), $tpl); } } $str.= ''; $str.= '$value = ''.$t['thumb'].'';
$str.= str_replace(array('{id}', '{value}'), array($id, $value), $tpl);
改成
$value = ''.$t['title'].'
';
$str.= str_replace(array('{id}', '{value}'), array($id, $value), $tpl);
这个不对哦!显示是数字呢!
$img = dr_string2array($t['thumb']); // 图片专用字段
$value = ''.$t['title'].'
';
$str.= str_replace(array('{id}', '{value}'), array($id, $value), $tpl);