如何从数据库中获取数据并逐段显示在网页上? [英] How to fetch data from database and show on the web page in paragraph by paragraph?

查看:199
本文介绍了如何从数据库中获取数据并逐段显示在网页上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发文章页面,我为文章页面提供管理页面.我将让用户写文章并将其保存在数据库中.

当我从数据库上传并显示在网页上时,我想逐段显示用户在admin中创建的段落.

I am developing article pages, i provide admin page for article page. i will let user write the article and save in database.

when i upload from database and show on the web page, i want to show paragraph by paragraph which user created as in admin.

推荐答案

有很多方法可以解决此问题问题.

尝试在跨度内写下您的段落.并且只需在HTML页面中使用固定的div ..您的问题将得到解决..

否则,您可以使用字符串生成器在指定字符后逐行拆分内容..

尽力尝试这个..
There is many ways to solve this problem.

Try to write your paragraphs inside span. And also just use fixed div in your HTML page.. Your problem will be solved..

or else you can use string builder to split the contents line by line after a specified charecters..

Try this.. all the best..


这篇关于如何从数据库中获取数据并逐段显示在网页上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆