将CSS元素应用于PHP动态数据

将CSS元素应用于PHP动态数据,php,css,Php,Css,我不熟悉将排版和页面布局元素应用于动态数据 我用过这个代码- 插入以下从我的数据库生成的段落。段落是完全分离的,但我需要创建一个列表格式的信息需要子弹或编号在段落的中间。我被指示将此代码放置在- p {     margin: 0 0 0.25em 0; } 但我不知道该怎么做。有人能帮我做这件事或者提出更好的建议吗?非常感谢您的帮助 数据输出: Make someone special feel special with a Customized and Personalized full

我不熟悉将排版和页面布局元素应用于动态数据

我用过这个代码-

插入以下从我的数据库生成的段落。段落是完全分离的,但我需要创建一个列表格式的信息需要子弹或编号在段落的中间。我被指示将此代码放置在-

p {
    margin: 0 0 0.25em 0;
}
但我不知道该怎么做。有人能帮我做这件事或者提出更好的建议吗?非常感谢您的帮助

数据输出:

Make someone special feel special with a Customized and Personalized full color Autograph Photo Football Sports Ball. Before clicking the Add to Cart button to place your order, please cut and past the INFORMATION NEEDED below into your email and email to tony@awardzone.net.

INFORMATION NEEDED:

TEXT ABOVE PHOTO - 1 Line Recommended [Type your text here]

CENTER PHOTO OR LOGO - (attach jpeg format image)

TEXT BELOW PHOTO - 1 Line Recommended [Type your text here]

TEAM COLORS - [Type your colors here]

YOUR CONTACT PHONE - [Type your text here]

YOUR EMAIL ADDRESS - [ [Type your text here]

(Optional) MASCOT NAME - [Type your text here]

And/or MASCOT LOGO (attach jpeg format image)

YOUR IN HAND DATE? - [Type your date here]

IMPORTANT - Your final layout proof will be approved by YOU before imprinting and shipment. *All personal information will remain confidential and will not be sold.

QUESTIONS? Email tony@awardzone.net or call Tony at 973-347-6819

这取决于数据的固定程度,但根据您所展示的,我将:

  • 在多个换行符上分解输入(使用preg_split)以获得包含所有行的数组
  • 从要用作前导段落的数组中删除前两个条目,并将其回显
  • 从要用作结束段落的数组中删除最后两个条目
  • 开始一个列表(
  • 将剩余数组作为列表项进行回显
  • 关闭列表
  • 呼应出两个结尾的段落