Posted by:
abrooks
(---.static.optonline.net)
I'm having trouble with PHP output. I'm not sure if I've installed or configured WampServer correctly
I copied the following from [
www.w3schools.com]
<!DOCTYPE html>
<html>
<body>
<?php
$x=5;
$y=6;
$z=$x+$y;
echo $z;
?>
</body>
</html>
to my Index.html.
I get no output - a blank web page. The "Run Example" button at w3schools shows "11" as the output.
I modified the code:
<!DOCTYPE html>
<html>
<body>
<?php
$x=5;
$y=6;
$z=$x+$y;
echo '<p>'.$z.'</p>';
?>
</body>
</html>
And got this as the output
'.$z.'
'; ?>
Can anyone point me in the right direction to fix this?