링크 1 링크 2 앞에 글자넣을수 있을까요?

링크 1 링크 2 앞에 글자넣을수 있을까요?

QA

링크 1 링크 2 앞에 글자넣을수 있을까요?

본문

안녕하세요... 아무리 연구해봐도... 안되서 이렇게 글 남깁니다.

 

1번 링크는  공식 사이트구요...

2번 링크는 자막파일 링크주소입니다.

 

1번 링크 앞에   공식

 

2번 링크앞에  자막 

 

이렇게 글자넣는 방법이 있을까요??

 

991202264_1640483277.1782.jpg

 

    <th scope="row">1.공식 / 2.자막링크</th>
    <td>    <!-- 관련링크 시작 { -->
    <!-- <section id="bo_v_link">
        <h2>관련링크</h2>
        <ul> -->
        <?php
        // 링크
        $cnt = 0;
        for ($i=1; $i<=count($view['link']); $i++) {
            if ($view['link'][$i]) {
                $cnt++;
                $link = cut_str($view['link'][$i], 40);
            ?>
            <li>
                <i class="fa fa-link" aria-hidden="true"></i> <a href="<?php echo $view['link_href'][$i] ?>" target="_blank">
                    
                    <strong><?php echo $link ?></strong>
                </a>
                <span class="bo_v_link_cnt"><?php echo $view['link_hit'][$i] ?>회 연결</span>
            </li>
            <?php
            }
        }
        ?>
        </ul>
    </section>
    <!-- } 관련링크 끝 --></td>
  </tr>

 

이 질문에 댓글 쓰기 :

답변 1

* PHP v7.0 이상


    <th scope="row">1.공식 / 2.자막링크</th>
    <td>    <!-- 관련링크 시작 { -->
    <!-- <section id="bo_v_link">
        <h2>관련링크</h2>
        <ul> -->
        <?php
        $link_head = [1=>'1.공식 ', '2.자막 '];
        // 링크
        $cnt = 0;
        for ($i=1; $i<=count($view['link']); $i++) {
            if ($view['link'][$i]) {
                $cnt++;
                $link = cut_str($view['link'][$i], 40);
            ?>
            <li>
                <i class="fa fa-link" aria-hidden="true"></i> <a href="<?php echo $view['link_href'][$i] ?>" target="_blank">
                    
                    <strong><?php echo ($link_head[$i]??'').$link ?></strong>
                </a>
                <span class="bo_v_link_cnt"><?php echo $view['link_hit'][$i] ?>회 연결</span>
            </li>
            <?php
            }
        }
        ?>
        </ul>
    </section>
    <!-- } 관련링크 끝 --></td>
  </tr>

버전 상관없이….


    <th scope="row">1.공식 / 2.자막링크</th>
    <td>    <!-- 관련링크 시작 { -->
    <!-- <section id="bo_v_link">
        <h2>관련링크</h2>
        <ul> -->
        <?php
        $link_head = array(1=>'1.공식 ', '2.자막 ');
        // 링크
        $cnt = 0;
        for ($i=1; $i<=count($view['link']); $i++) {
            if ($view['link'][$i]) {
                $cnt++;
                $link = cut_str($view['link'][$i], 40);
            ?>
            <li>
                <i class="fa fa-link" aria-hidden="true"></i> <a href="<?php echo $view['link_href'][$i] ?>" target="_blank">
                    
                    <strong><?php echo (isset($link_head[$i])?$link_head[$i].'').$link ?></strong>
                </a>
                <span class="bo_v_link_cnt"><?php echo $view['link_hit'][$i] ?>회 연결</span>
            </li>
            <?php
            }
        }
        ?>
        </ul>
    </section>
    <!-- } 관련링크 끝 --></td>
  </tr>
답변을 작성하시기 전에 로그인 해주세요.
전체 60,252
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT