You need a regular expression, and better code directly (if it doesn’t make it difficult for you) to replace:
/текст<br />
on
<b>текст</b>
Thanks in advance for the help!
You need a regular expression, and better code directly (if it doesn’t make it difficult for you) to replace:
/текст<br />
on
<b>текст</b>
Thanks in advance for the help!
Kakto logic in the issue is not enough, but oh well.
$str = "/текст<br />"; if(preg_match("#\/(.*)<br \/>#", $str)) { $str = preg_replace("#\/(.*)<br \/>#", "<b>$1</b>", $str); } echo $str;
<?php $txt = "/текст<br />"; $txt = str_replace("/","<br>",$txt); echo($txt); ?>
So try
Only better instead / use for example -b-
or _b_
Source: https://ru.stackoverflow.com/questions/204161/
All Articles