How to Use a PHP Table Instead of Frames
The PHP language lets you create and set up a table that displays in the user's browser. You can replace a current iframe with PHP code that displays a table. This technique provides you with the ability to display dynamic content, so you do not need to rely on an external page within the iframe. An iframe lets you include another external PHP page. You can create your own PHP code to create the table instead of relying on an external page. PHP creates a dynamic table instead of using a static table in HTML.
Instructions
-
-
1
Right-click the PHP file you want to use to display the table. Select "Open With" and double-click the PHP editor in the list of programs.
-
2
Delete the code that displays the iframe. The following code is an iframe statement:
<iframe src="somefile.php"></iframe>
Delete the entire iframe statement in your PHP file.
-
-
3
Create the PHP table. The following code shows you how to create a PHP table using the "echo" command:
echo "<table>";
echo "<tr>";
echo "<td>table information</td>";
echo "</tr>";
echo "</table>";
The code above prints out a small, one row and column table. You can expand the table to as many rows and columns you need to display the dynamic information.
-
4
Save the file and open the PHP file in a Web browser. You must upload the file to your website host provider for the changes to go live on your website.
-
1
Tips & Warnings
You can also include JavaScript on the table using the "echo" command.
Make sure you remember to close the table's tag to avoid errors on your page.