Throw away your tables –

Posted on

Why did I create this project

Once upon a time in my apprenticeship I had to refactor some table layout into a fancy new div layout. This is why I’ve created this website, which has the sole purpose of replacing all td, tr and table tags with div tags.

How did I implement the solution

This is a dead simple PHP script which replaces the td, tr and table tags via regex with div tags. It might no be the ideal solution but it worked for me and didn’t take to long to implement.

What difficulties did I encounter

At the time I was still learning how to use regex and had some problems constructing a working regex for replacing the table tags with div tags.

Today I wouldn’t use regex anymore for editing html for some pretty clear reasons.

Leave a Reply