[굵게]라고 치면 <b>명령이 되게 할수 없나요 정보
[굵게]라고 치면 <b>명령이 되게 할수 없나요본문
html용 소스 여러가지를 사용해보고 싶은데
예를 들어 내용부분에
[굵게]글자를 두껍게[/굵게]
[흐르기]marquee소스를 사용하기[/흐르기]
라고 치면
글자를 두껍게
등등의 효과가 출력되어 나오게 할수 없나요?
예를 들어 내용부분에
[굵게]글자를 두껍게[/굵게]
[흐르기]marquee소스를 사용하기[/흐르기]
라고 치면
글자를 두껍게
등등의 효과가 출력되어 나오게 할수 없나요?
댓글 전체

출력할때..
$content = $content // 내용이라고 치면...
$new_content = str_replace("[굵게]","<b>",$content);
$new_content = str_replace("[/굵게]","</b>",$content);
echo $new_content;
너무 원시적인가요?
$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>
이렇게 넣었더니 [굵게] 이부분만 적용되서
진하게[/굵게] 이렇게 출력됩니다.
<span class=content>
<?
$content = $content;
$new_content = str_replace("[/굵게]","</b>",$content);
$new_content = str_replace("[굵게]","<b>",$content);
echo $new_content;
?>
</span>
이렇게 넣었더니 [굵게] 이부분만 적용되서
진하게[/굵게] 이렇게 출력됩니다.

위에 지윤지영님이 남기신 코멘트처럼 순서대로..
1번째에 [굵게] 2번째에 [/굵게] 로 쓰세요.
순서가 바뀌에 [/굵게]부분이 적용이 안되어서 그렇습니다.
1번째에 [굵게] 2번째에 [/굵게] 로 쓰세요.
순서가 바뀌에 [/굵게]부분이 적용이 안되어서 그렇습니다.
$new_content = str_replace("[굵게]","<b>",$content);
$new_content = str_replace("[/굵게]","</b>",$new_content);
아니면
$new_content = str_replace("[/굵게]","</b>",$content);
$new_content = str_replace("[굵게]","<b>",$new_content);
$new_content = str_replace("[/굵게]","</b>",$new_content);
아니면
$new_content = str_replace("[/굵게]","</b>",$content);
$new_content = str_replace("[굵게]","<b>",$new_content);