+ 2

.html or .php

When combining html with php, which data type should be used?

16th Feb 2021, 11:08 AM
Philipp
Philipp - avatar
5 odpowiedzi
+ 6
Use .html as file extension and php code in <?php ?>
17th Feb 2021, 6:40 PM
AISHA
AISHA - avatar
+ 5
When combinning php and html it should used *. php type. Here an example: https://code.sololearn.com/wdMg5lB9T43K/?ref=app
16th Feb 2021, 4:49 PM
JaScript
JaScript - avatar
+ 3
I am asking about the correct file ending.
16th Feb 2021, 11:42 AM
Philipp
Philipp - avatar
+ 2
Do you have a code related to this doubt? If you do, then please share its link for a review. Did you mean file extension? well, if a HTML document has PHP code embedded, then you save the file using .php extension. If you save it using .htm or .html, then PHP will ignore (not process) the code in it.
16th Feb 2021, 11:46 AM
Ipang
+ 1
I didn't understand what you mean by "data type" here ...
16th Feb 2021, 11:39 AM
Ipang