|
|
|
07-05-15
|
조회 3,809
|
|
|
|
07-05-14
|
조회 3,890
|
|
|
|
07-04-27
|
조회 4,206
|
|
|
|
07-04-24
|
조회 3,665
|
|
|
|
07-04-17
|
조회 3,759
|
|
|
|
07-04-09
|
조회 3,708
|
|
|
|
07-04-09
|
조회 4,010
|
|
|
|
07-04-05
|
조회 3,687
|
|
|
|
07-03-26
|
조회 4,147
|
|
|
|
07-03-24
|
조회 4,018
|
|
|
|
07-03-20
|
조회 4,090
|
|
|
|
07-03-19
|
조회 3,680
|
|
|
|
07-03-09
|
조회 3,704
|
|
|
|
07-03-04
|
조회 4,244
|
|
|
|
07-03-03
|
조회 3,716
|
|
|
|
07-03-02
|
조회 3,882
|
|
|
|
07-02-27
|
조회 3,756
|
|
|
|
07-02-23
|
조회 4,558
|
|
|
|
07-02-07
|
조회 3,875
|
|
|
|
07-02-05
|
조회 3,773
|
댓글 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);