rowspan is definitely the way to go. However, instead of spitting out the HTML when you go, you will need to keep track of how many lines you need to cover, and then build the HTML accordingly.
This is an interesting problem without a simple solution. The problem is that rowspan should be in the first <td> , but you won to know how many lines to skip until you have processed them. Best to look at PHP & rsquo; The document object model . The DOM will allow you to build a table and, if necessary, configure the rowspan attribute.
A few places to run:
Update
This should illustrate what is involved.
<html> <head> <title>My Sample</title> <style type="text/css"> body { font: normal 62.5% sans-serif; } table { font-size: 1.3em; width: 420px; border: 0; border-collapse:collapse; } td { vertical-align: top; border-bottom: 1px solid
Copy the code and run it. The layout is exactly what you asked for, but naturally, you will need to adapt it to your needs.
source share