This may be another dumb newbie question but it has me puzzled.
I am writing a program to write PHP code. Basically, this portion is used to write the table code for a table to display stock and the old and new price and percentage change.
Why does the below code work with print and not with echo???
When I use echo for the first line, I get an unexpected echo at line 5 error. I thought print and echo were interchangeable???
The code below is the output of my program. Obviously I want to fix any mistakes now since I will use this to write a lot of scripts.
TIA Larry Grant aka arelgee
<html>
<body>
<?php>
// The problem code
print "<table border=1>\n";
//******************
echo "<tr><td>Symbol</td><td>Old Price</td><td>New pricel</td><td> Change</td></tr>\n";
echo " <tr><td>ACPW</td><td>1.81</td><td>1.91</td><td>888</td></tr>\n";
echo " <tr><td>ACTU</td><td>2.52</td><td>2.07</td><td>888</td></tr>\n";
echo " <tr><td>ADCT</td><td>2.34</td><td>1.81</td><td>888</td></tr>\n";
echo " <tr><td>ADSX</td><td>0.47</td><td>0.51</td><td>888</td></tr>\n";
echo " <tr><td>AKAM</td><td>2.2</td><td>1.65</td><td>888</td></tr>\n ";
echo " <tr><td>ALGX</td><td>1.04</td><td>0.83</td><td>888</td></tr>\n";
echo "</table>\n";
?>
</body>
</html>