将html分成多个部分然后保存到数据库

时间:2017-04-13 08:55:25

标签: php html mysql

我想将以下html中的部分分开,并将它们保存到每个数字的mysql字段中。每个部分都以&#39;#&#39; (例如<p>#2</p>)。我怎么能这样做?

<p>#1.</p><p>This is the <u>first</u> example docx file in the <b>demo section</b>.</p><p><b>T</b><b>EST HEADER</b></p><p><u>More content that has been underlined.</u></p><p>In the below table there ares 2 example contacts:</p><p>Jawab 1 A</p><p>Jawab 1 A</p><p>Jawab 1 A</p><p>Jawab 1 A</p><p>Jawab 1 A</p>

<p>#2.</p><ul><li>Format text in bullet lists</li><li>Apply different background colours on the text</li></ul><table class="col_count_5"><tr><td class="col_1" ><p>5 x 4</p></td><td class="col_2" ><p>table</p></td><td class="col_3 has_colspan"  colspan="2"><p><b>Two</b> horizontally merged cells</p></td><td class="col_4" ><p>1.5</p></td></tr><tr><td class="col_1" ><p>Row 2</p></td><td class="col_2" ><p><b>Two</b> vertically merged cells</p></td><td class="col_3" ><p><b>Three</b> vertically merged cells</p></td><td class="col_4" ><p>2.4</p></td><td class="col_5" ><p>2.5</p></td></tr><tr><td class="col_1" ><p>Row 3</p></td><td class="col_2" ></td><td class="col_3" ></td><td class="col_4 has_colspan"  colspan="2"><p><b>Two</b> by <b>Two</b> merged cells</p></td></tr><tr><td class="col_1" ><p>Row 4</p></td><td class="col_2" ><p>4.2</p></td><td class="col_3" ></td><td class="col_4 has_colspan"  colspan="2"></td></tr></table>

<p>#3.</p><p>This is the <u>first</u> example docx file in the <b>demo section</b>.</p><p><u>More content that has been underlined.</u></p><p>In the below table there ares 2 example contacts:</p><p>Jawab 1 A</p><p>Jawab 1 A</p><p>Jawab 1 A</p><p>Jawab 1 A</p><p>Jawab 1 A</p>

0 个答案:

没有答案