echo will not print out a value. I do the simple string " " and it doesn't even do that. It's just blank in my browser. I use netbeans and firefox and chrome. Any idea as to what I'm doing wrong? Simple code snippet:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>PHP Testing</title>
</head>
<body>
<?php
echo "print me";
?>
</body>
</html>
Thanks for any future help.
echo not working
Moderator: General Moderators
Re: echo not working
it's a php file on a server with php?
Re: echo not working
To determine if it is processing PHP, when you view the page, hit CTRL-U to see the source. If you actually see the <?php ... ?> code then it is not a .php file or the server is not set up for it. Never just go off of what you "see" in the browser, remember the source of the page is the actual output.
-Greg
-Greg
Re: echo not working
I think what's happened is I don't have a local host set up. I'm installing xampp to see if that solves the problem. Thank you for your replies.
Re: echo not working
I installed xampp and had to put my projects in the htdocs folder and change a few settings and it worked. A co-worker helped with the final touches of this problem. Sorry I didn't reply to this. I needed a quick answer so I posted on a few forums at once and another forum was helping but I thank you all.