PHP-使星号之间的文本加粗

时间:2019-06-16 18:51:57

标签: javascript php

我想制作一个PHP函数,使文本在1个星号之间加粗,否则将显示常规文本。

示例:

Welcome to my store *This is my house* It is located in

谁可以帮助我?我尝试这样做,但没有成功。

        if(preg_match("/[a-zA-Z0-9_]* *\(*\*[a-zA-Z0-9_]*\*\)* *[a-zA-Z0-9_]*/
", $text, $temp))
    {
        $newText = " " . $text . " ";
        $split = spliti("\\*", $newText);

0 个答案:

没有答案