Jump to content

help...php in html


Recommended Posts

I'm just now learning some php.

I'm getting some basic ideas of how it works and its going well...but I just cannot figure out why echo-ing php in html doesn't work....

If I have a php file with this contents:

echo "test echo";

$blah="display blah";

echo $blah;

and I run the file, it works great.

However, if I put in the same code inline with html code by:


echo "test echo";

$blah="display blah";

echo $blah;


....nothing.  Empty.  Nothing gets displayed.

Why is this?  Also, because of this I cannot figure out how to use variables from php in html...same issue I believe.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...