What are some common pitfalls to avoid when using tables in PHP for website design?

One common pitfall to avoid when using tables in PHP for website design is using inline styles for formatting, which can make the code messy and difficult to maintain. Instead, it's recommended to use external CSS stylesheets to separate the design from the content.

// Bad practice: using inline styles for table formatting
echo '<table style="border: 1px solid black;">';

// Good practice: using external CSS stylesheets for table formatting
echo '<link rel="stylesheet" type="text/css" href="styles.css">';
echo '<table class="table-style">';