text wont appear after echo in php? (very basic program)?

somedude

New member
been messing around with php and having a little problem. here is my code:

<html>
<head>
<title>Variables</title>
<?php
$var1 = "Hello";
$var2 = "World";
echo "$var1 $var2";
echo "Hello World";
?>
</head>
</html>

the problem is when i view this in my browser, it just appears as a blank page. no text is displayed. When i add headers ( echo "<H1>Hello World</H1>";) the text appears, but it looks like this "Hello World; ?> " without the quotes of course. So is this a problem in my code? my browser (firefox)? or my editing program (notepad++)?
 
Back
Top