Basic PHP development tutorial: Simple UBB text editor
If you don’t understand this section, you can skip it. If you are interested, you can read it carefully in the future
Let’s take a look at the UBB editor. This is a text processing technology often used on websites. Because of the use of the UBB file editor, the format we specified can exist. If the format is not specified, users cannot display it on the website.
Let’s take a look at the effect:
\1
', '\1
', '\1
', '\2
', ); //使用正则匹配$string,将$string当中的值变为$replace的效果 $ubb=preg_replace($pattern,$replace,$string); echo $ubb; ?>
The output result is shown on the right