开发者

html tag in php variables

开发者 https://www.devze.com 2023-01-22 06:16 出处:网络
given a php variable $a=\"<b>hello</b>\"; echo $a; //prints <b>hello<b> But I want it to pr开发者_运维百科int hello in bold with the formatting.

given a php variable

$a="<b>hello</b>";
echo $a;
//prints <b>hello<b>

But I want it to pr开发者_运维百科int hello in bold with the formatting. Please tell me what I should do...


echo "<b>" . $a . "</b>";

oh, you edited your code. what you have should work.

0

精彩评论

暂无评论...
验证码 换一张
取 消