|
|
|
18년 전
|
조회 4,165
|
|
|
|
18년 전
|
조회 3,837
|
|
|
|
18년 전
|
조회 3,653
|
|
|
|
18년 전
|
조회 3,486
|
|
|
|
18년 전
|
조회 3,718
|
|
|
|
18년 전
|
조회 3,670
|
|
|
|
18년 전
|
조회 3,736
|
|
|
|
18년 전
|
조회 4,073
|
|
|
|
18년 전
|
조회 3,522
|
|
|
|
18년 전
|
조회 3,594
|
|
|
|
18년 전
|
조회 3,559
|
|
|
|
18년 전
|
조회 3,859
|
|
|
|
18년 전
|
조회 3,535
|
|
|
|
18년 전
|
조회 3,999
|
|
|
|
18년 전
|
조회 3,837
|
|
|
|
18년 전
|
조회 3,914
|
|
|
|
18년 전
|
조회 3,537
|
|
|
|
18년 전
|
조회 3,551
|
|
|
|
18년 전
|
조회 4,096
|
|
|
|
18년 전
|
조회 3,569
|
댓글 4개
$content = $content // 내용이라고 치면...
$new_content = str_replace("[굵게]","<b>",$content);
$new_content = str_replace("[/굵게]","</b>",$content);
echo $new_content;
너무 원시적인가요?
<span class=content>
<?
$content = $content;
$new_content = str_replace("[/굵게]","</b>",$content);
$new_content = str_replace("[굵게]","<b>",$content);
echo $new_content;
?>
</span>
이렇게 넣었더니 [굵게] 이부분만 적용되서
진하게[/굵게] 이렇게 출력됩니다.
1번째에 [굵게] 2번째에 [/굵게] 로 쓰세요.
순서가 바뀌에 [/굵게]부분이 적용이 안되어서 그렇습니다.
$new_content = str_replace("[/굵게]","</b>",$new_content);
아니면
$new_content = str_replace("[/굵게]","</b>",$content);
$new_content = str_replace("[굵게]","<b>",$new_content);