728x90
반응형
SMALL
page_insertafter
string page_insertafter(string $paging_html, string $insert_html)
페이징 코드의 </span></nav> 태그 이전에 코드를 삽입
경로
lib/common.lib.php
인수
$paging_html
페이지 HTML
$insert_html
추가 HTML
예제
$write_pages = ' <nav class="pg_wrap"><span class="pg"><span class="sound_only">열린</span><strong class="pg_current">1</strong><span class="sound_only">페이지</span> <a href="/test.php?&page=2" class="pg_page">2<span class="sound_only">페이지</span></a> <a href="/test.php?&page=3" class="pg_page">3<span class="sound_only">페이지</span></a> <a href="/test.php?&page=4" class="pg_page">4<span class="sound_only">페이지</span></a> <a href="/test.php?&page=5" class="pg_page">5<span class="sound_only">페이지</span></a> <a href="/test.php?&page=6" class="pg_page">6<span class="sound_only">페이지</span></a> <a href="/test.php?&page=7" class="pg_page">7<span class="sound_only">페이지</span></a> <a href="/test.php?&page=7" class="pg_page pg_end">맨끝</a> </span></nav>'; $write_pages = page_insertbefore($write_pages, '<a href="'.$prev_part_href.'" class="pg_page pg_prev">이전검색</a>'); echo $write_pages; // Output <nav class="pg_wrap"><span class="pg"> <span class="sound_only">열린</span><strong class="pg_current">1</strong><span class="sound_only">페이지</span> <a href="/test.php?&page=2" class="pg_page">2<span class="sound_only">페이지</span></a> <a href="/test.php?&page=3" class="pg_page">3<span class="sound_only">페이지</span></a> <a href="/test.php?&page=4" class="pg_page">4<span class="sound_only">페이지</span></a> <a href="/test.php?&page=5" class="pg_page">5<span class="sound_only">페이지</span></a> <a href="/test.php?&page=6" class="pg_page">6<span class="sound_only">페이지</span></a> <a href="/test.php?&page=7" class="pg_page">7<span class="sound_only">페이지</span></a> <a href="/test.php?&page=7" class="pg_page pg_end">맨끝</a><a href="" class="pg_page pg_prev">이전검색</a> </span></nav>
728x90
반응형
LIST