I started learning php yesterday , have previous experience of c++
now tell me whats wrong with this script ?
I have installed WAMP and made a file whatever.php in www root directory
now every .php file there runs but this whatever.php gives error
heres the script
<?php
$display_prices = true;
if ($display_prices) {
echo "<table border=\”1\”>\n";
echo "<tr><td colspan=\"3\">";
echo "today’s prices in dollars";
echo "</td></tr>";
echo "<tr><td>\$14.00</td><td>\$32.00</td><td>\$71.00</td></tr>\n";
echo "</table>";
function addfucker($num1,$num2){echo $num1+$num2;}
$a=2;$b=3;
addfucker($a,$b);
function maketable($a,$b,$c,$d){
echo "<table><tr><td>$a</td><td>$b</td><td>$c</td><td>$d</td></tr></table>";
}
maketable("yo",3,"lo","5");
?>
on accessing it with mozilla (localhost:8888/whatever.php)it displays some orange table thingy saying "parse error, syntax error, unexpected end of file in c:/wamp/www/whatever.php on line 23"
Now the line 23 is ?>
what could be wrong with this line? :/
its a freaking end tag of php whats wrong with it
and I tried adding the html tags in this document like
this
<!Doctype html>
<head></head>
<body>
<?php
//above mentioned script
?>
</body>
</html>
And now it says the same error in line 29 which is </html>
wtf is wrong with this shit =s