$i=1;
foreach ($list as $key=>$val) {
if($content_type == '2') {
$title = '['.$val['column_name'].'] '.$val['title'];
} else {
$title = $val['title'];
}
$content = strip_tags($val['content']);
$title_txt = mb_strimwidth($title, '0', '60', '..', 'utf-8');
$content_txt = mb_strimwidth($content, '0', '180', '..', 'utf-8');
foreach($arr_search_keyword as $val3) {
$title_txt = str_replace($val3, '
'.$val3.'', $title_txt);
$content_txt = str_replace($val3, '
'.$val3.'', $content_txt);
}
$display_date_txt = gf_article_date_text($val['display_date']);
$share_title = str_replace("'", "\\'", $val['title']);
$share_title = str_replace('"', '\\"', $share_title);
$share_content = mb_strimwidth($content, '0', '250', '..', 'utf-8');
$share_content = htmlspecialchars($share_content);
$share_content = str_replace("'", "\\'", $share_content);
$share_content = str_replace('”', '"', $share_content);
$main_img = $val['main_img'];
if($content_type == '2') {
$view_url = '/web/news/column_view/'.$val['idx'];
$share_id_name ="column_".$val['idx'];
} else if($content_type == '3') {
$view_url = '/web/life/life_view/'.$val['idx'];
$share_id_name ="life_".$val['idx'];
}
?>
=$title_txt?> if($content_type!='1') { ?>=$display_date_txt?>
}?>
if($content_type == '2') {?>
} else if($content_type == '3') {?>
} ?>
$i++;
}?>