테스트 사이트 - 개발 중인 베타 버전입니다

지금은 "홍길동" 이렇게 이름 이 출력이 되는데 채택완료

alexseo 5년 전 조회 2,004

아래의 소스에서 

        $is_name    = get_text($row['is_name']); 부분을 수정하고 싶어요.

지금은 "홍길동" 이렇게 이름 이 출력이 되는데

"홍**" 별표로 출력이 되게 고치려고요.

어떻게 하면 되나요?

감사합니다.

 

=======================================

 

    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 '

';     ?>

댓글을 작성하려면 로그인이 필요합니다.

답변 2개

채택된 답변
+20 포인트
5년 전

참고하세요 https://gnustudy.com/bbs/board.php?bo_table=yc_tip&wr_id=109

 

이렇게 수정 $is_name  =  preg_replace('/(?<=.{1})./u','*',$row['is_name']);

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

a
5년 전

작은별님, 답변 감사합니다.^^

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인