Question:

Is this the proper way to implement XHTML meta tags with PHP code?

by  |  earlier

0 LIKES UnLike

<html>

<head>

(Title, description, keyword tags)

</head>

(PHP Code)

</html>

Urgent response needed!

 Tags:

   Report

2 ANSWERS


  1. YES.

    It&#039;s possible to insert php code in html page, just use &lt;?php and ?&gt;

    Example:

    &lt;html&gt;

    &lt;body&gt;

    &lt;?php echo &quot; this is the body text&quot; ;

    &lt;/body&gt;

    &lt;html&gt;

    will be displayed:

    &lt;html&gt;

    &lt;body&gt;

    this is the body text

    &lt;/body&gt;

    &lt;html&gt;

    To know how to use php in html, go to:

    http://myphpsource.blogspot.com/2008/08/...

    Thank you.


  2. You can just use echo or print to put the code there, like this:

    echo &quot;&lt;div&gt;This is a div&lt;/div&gt;&quot;;

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.