Echo display end of command line

Attempting to regain php literacy. (and my first venture into HTML5) Can’t even get my “Hello World” to work. Here’s my code

<!DOCTYPE html>
<html>
<head>
<title></title>
<meta name="" content="">
</head>
<body>
<?php echo ("<p>Why is this happening?</p>"); ?>
</body>
</html>

What displays is

Why is this happening?
"); ?>

i.e. the statement excerpt following the </p>

I’m running under windows 8. Same result in chrome 29.0, Firefox 24.0, IE 10.0

Not a good omen.

grNadpa

Hmm… Not sure.

<?php echo ("<p>Why is this happening?</p>"); ?>
<?php echo "<p>Why is this happening?</p>"; ?>
<?="<p>Why is this happening?</p>"; ?>

Produces the following output for me

Why is this happening?

Why is this happening?

Why is this happening?

Apparently has to do with my configuration because, after copy pasting your code, I get

Why is this happening?
"); ?> Why is this happening?
"; ?> Why is this happening?
"; ?>

just to confirm, here’s the script

<!DOCTYPE html>
<html>
<head>
<title></title>
<meta name="" content="">
</head>
<body>
 <?php echo ("<p>Why is this happening?</p>"); ?>
<?php echo "<p>Why is this happening?</p>"; ?>
<?="<p>Why is this happening?</p>"; ?>
</body>
</html>

So it seems. Silly question (I’m sure), but you are using a .php extension to your file right?

Thank you for the silly question.

'nuf said.

Was that the issue? …

Yes. Quite embarrassing.

Ah, no biggie, at least we got to the bottom of it :smiley: