我想制作一个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);