Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Please Help the Beginner? Embedded PHP in HTML. Re: Please Help the Beginner? Embedded PHP in HTML.

#107674
Senff
Participant

I know how this could be confusing, but this is basically how it works….


[DO PHP STUFF]
} ?>

Now, instead of [DO PHP STUFF] you can obviously put some PHP code there. But if you want plain old HTML, that’s allowed, so you’d get this:


?>
[DO HTML STUFF]
} ?>

So basically, you keep the PHP logic/functionality, but you just close the PHP (temporarily) to enable some HTML and then open the PHP again.

Your second example with the echo won’t work because you’re “breaking” the PHP logic in the middle, so to speak.

Hope this helps.