简体   繁体   中英

Implementing PHP Inside a HTML Table

Currently, I am building a table full of content. I can sucessfuly make one row that has one cell (the first cell) saying data, however when I attempt to use php to echo something, it does not show up. Why is this? If you need my whole program I would be happy to include it, however to stay clean I am going to only include a section of the table.

Code:

   <tr>
    <td>data </td>
    <td><?php echo "hi"; ?> </td>
    <td> </td>
    <td> </td>
</tr>

What you are doing is very right. There are two reasons why that may not be working. 1- check if your filename ends with .php and 2- check if you are running your code from a webserver that supports php.

To know if php is installed just try to right a simple php page iwth the following content.

if it renders it means you have php installed

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM