지금은 "홍길동" 이렇게 이름 이 출력이 되는데
본문
아래의 소스에서
$is_name = get_text($row['is_name']);
부분을 수정하고 싶어요.
지금은 "홍길동" 이렇게 이름 이 출력이 되는데
"홍**" 별표로 출력이 되게 고치려고요.
어떻게 하면 되나요?
감사합니다.
=======================================
<?php
$thumbnail_width = 500;
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$is_num = $total_count - ($page - 1) * $rows - $i;
$is_star = get_star($row['is_score']);
$is_name = get_text($row['is_name']);
$is_subject = conv_subject($row['is_subject'],50,"…");
//$is_content = ($row['wr_content']);
$is_content = get_view_thumbnail(conv_content($row['is_content'], 1), $thumbnail_width);
$is_reply_name = !empty($row['is_reply_name']) ? get_text($row['is_reply_name']) : '';
$is_reply_subject = !empty($row['is_reply_subject']) ? conv_subject($row['is_reply_subject'],50,"…") : '';
$is_reply_content = !empty($row['is_reply_content']) ? get_view_thumbnail(conv_content($row['is_reply_content'], 1), $thumbnail_width) : '';
$is_time = substr($row['is_time'], 2, 8);
$is_href = './itemuselist.php?bo_table=itemuse&wr_id='.$row['wr_id'];
$hash = md5($row['is_id'].$row['is_time'].$row['is_ip']);
if ($i == 0) echo '<div class="panel panel-default">';
?>
답변 2
참고하세요
https://gnustudy.com/bbs/board.php?bo_table=yc_tip&wr_id=109
이렇게 수정
$is_name = preg_replace('/(?<=.{1})./u','*',$row['is_name']);
작은별님, 답변 감사합니다.^^