+ 1
How to mix PHP with HTML?
In my HTML course it said that I will need to use a scripting language like PHP to make my HTML template work. What type of platform or compiler do I need to allow me to incorporate both languages in a document? Thanks.
4 Respostas
+ 3
LAMP: Linux Apache MYSQL PHP
MAMP: Mac Apache MYSQL PHP
WAMP: Windows Apache MYSQL PHP
+ 2
Jacques The question was what type of platform. Read the question, and don't downvote when you're wrong.
0
Apache web server.
You can't open php files in the browser like you can do with html.
You can use html, css, javascript and php in the same php file.
You can try it in the playground.
0
You don't need a compiler.
You have to create a .php file and then you can use both HTML and PHP in it.
Declare your php code with "<?php" and "?>" to close it.
Like this: (inside index.php)
<!DOCTYPE html>
<head>...</head>
<body>
<?php echo "written with PHP"; ?>
</body>
For further information, you should visit http://php.net/manual/en/faq.html.php !