using php with html

I writing this post with the view of that you familiar with “what is HTML Page and basic PHP?”. For run PHP codes inside PHP also require a server on your local machine which is a publish in our blog. So we know that HTML is a base of web development where developer can present content in fashionable way for website. Well form formatted of HTML pages give benefits to spread world-wide which will we cover later. HTML pages have basic structure to present contents. There are some different area in HTML which use for different purpose. Now given below is basic structure of HTML page.
<html>
<head>
<title>This is the title shown above the menu bar on my browser</title>
</head>
 
<body>
I wish I knew how to write PHP in HTML files...
</body>
 
</html>
Now we come to our main aim is use of php. We can combine HTML and PHP in same page of website. In above section we learn basic structure of HTML Page. Look “How merge PHP codes in HTML?”
<html>
<head>
<title>This is the title shown above the menu bar on my browser</title>
</head>
 
<body>
<?php
  print "I know how to write PHP!";
?>
 
<b>Perhaps I'll be lazy and write more php.</b>
 
<?php print "No way!  PHP is cool!<br />"; ?>
</body>
 
</html>
Now we saw “How combine to language contents?”. <?php show the start of php working area and ?> show end of php codes. So we can easly start php area any where in html page according to requirement. You can put your codes inside of  <?php your statement goes here…… ?> . if you type your code out side of <?php ?>  it not working and html page is taking it as simple contents. Because to work with php need to define its working area. So then php language trace and under of what command type and there contents.
Share:

1 comment:

  1. Pretty nice post. I just stumbled upon your weblog and
    wanted to say that I have really enjoyed browsing your blog posts.
    After all I will be subscribing to your rss feed and I hope you write again soon!
    Look into my web blog ; Private Krankenversicherung vergleichen

    ReplyDelete