Josh.Waller wrote:
I always find it interesting with how other people code, the way you did that is totaly different to how i would do the same thing, i would do it as follows
Code:
<?php
$message = "I love PHP!";
echo "
<html>
<body>
<h1>" . $message . "</h1>
</body>
</html>";
?>
First, Josh, thank you very much for responding, as I am afraid I'm not making much progress on this site, and your response gives me some hope.
Please appreciate that the code I posted is exactly as downloaded from the internet. It is not my creation, since I don't have enough PHP experience to have a "coding style".
And to highlight the point of my original post -- that I can't seem to get the simplest script to run on this site -- your script wouldn't run either on my machine. That's why I'm asking for assistance.
The output of your script was:
" . $message . "
";
Note the regular sized line of text on the line after the <h1> sized text.
Oh, and I added the brackets to the print command, as you suggested. It made no difference to the output of my example, but if you can think of anything else, I would appreciate it.