How i can execute php inside html code | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How i can execute php inside html code

hi iwill design a website but ican programmed it by php iwant to know the idea of programming website . iam very good in php but i can,t use it with html code. also i put the php code inside html code doesn,t work

30th Aug 2020, 3:24 PM
Monzer
11 Answers
+ 2
yes...xampp local host
30th Aug 2020, 6:08 PM
Monzer
+ 2
Was there any error message from PHP, or the PHP code is printed as regular text? could you be more apecific about the "doesn't work" part here ...
30th Aug 2020, 10:38 PM
Ipang
+ 1
Can i see that code ?
30th Aug 2020, 3:25 PM
🍎Mi_ra_go
🍎Mi_ra_go - avatar
+ 1
You just need to put the php code inside the tag <?php ?>. For example: <title><?php echo "Title"; ?></title>
30th Aug 2020, 3:29 PM
Gabriele
Gabriele - avatar
+ 1
Did you save the file with the php extension?
30th Aug 2020, 5:52 PM
Gabriele
Gabriele - avatar
+ 1
Mmh weird, are you running the code on a server?
30th Aug 2020, 6:04 PM
Gabriele
Gabriele - avatar
0
Mi_ra_go that way does not work
30th Aug 2020, 5:21 PM
Monzer
0
it,s so long code😅
30th Aug 2020, 5:22 PM
Monzer
0
iwill give you a shurcut
30th Aug 2020, 5:23 PM
Monzer
0
<html> <head> <title>it,s title</title> <body> <?php echo "hi iam php and iam not work😥"; ?> </body> </html>
30th Aug 2020, 5:26 PM
Monzer
0
i was try .php and .html also
30th Aug 2020, 5:54 PM
Monzer