edorahg edorahg - 4 months ago 11x
PHP Question

Simple PHP echo code not working

Here is my html with a php script:

<title>Bob's Auto Parts</title>
<h1>Bob's Auto Parts</h1>
<table width = 100% >
echo "<td>This is working.</td>";

Why is the output of this appearing with a ; ?>. I want it to be 'This is working.' only. Here is the ouput

Bob's Auto Parts

Bob's Auto Parts

This is working.";

I know I am doing something wrong here but not able to figure it out. Thanks in advance.


Any of these (or more) could be your answer why it is not working

  1. Is there actually PHP running on your computer?
  2. Is the file extension .php?
  3. Are you accesing the file through your browser doing something like http://localhost/myfile.php
  4. If it is on a remote server, is there PHP installed?