mysql创建数据库 粗体,如何在MySQL数据库文本字段中创建粗体数据?

Is it possible to create bold text in a MySQL database text table field?

We are putting our articles in our database and I want to create bold titles and subtitles. Is this possible? Thanks

解决方案

Markdown

I would advise you to use a markdown-style formatting (PHP/.NET), which would mean bold-text would be stored like this:

**I am bold**

Storing HTML

If you can't use markdown on your project, you can store HTML as well - I would just be very careful about what tags you store. You wouldn't want somebody posting tags in your database for instance:

I am bold

Late-Styling

Or make all values from the title and subtitle fields bold when you print them on your page:

<?php print $row->title; ?>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值