Implementing PHP Inside a HTML Table
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>
Make sure your page ends with the extension
.php– Shankar Damodaran
Apr 6 '14 at 6:45
.php
Do you have an apache webserver running?
– Aiias
Apr 6 '14 at 6:46
What is the error you are getting
– user2533777
Apr 6 '14 at 6:47
jsfiddle.net/5aZn2
– user3496349
Apr 6 '14 at 6:49
1 Answer
1
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
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Hope as per your code nothing wrong.... can u post full code ?
– user1844933
Apr 6 '14 at 6:45