1. Create a new php file and name it test.php to explain how php generates a table of 5 times 7.
2. Use the header () method to set the encoding format of the page to utf-8.
3. Define an array of 5 times 7 to store the data of the generated table.
4. In the test.php file, use the table tag of the echo table and set the border to 1px.
5. In the test.php file, use foreach to traverse the array and output the table row (tr). In foreach, the element values in the foreach loop array are used as the data of the table cells.
6. Open the test.php file in a browser to view the results.