Meta Tags in PHP?

Discussion in 'PHP' started by JohnathanZ, Dec 27, 2013.

  1. JohnathanZ

    JohnathanZ New Member

    Joined:
    Oct 10, 2012
    Messages:
    89
    How do you enter meta tags information on a webpage that is in PHP?

    Detailed step-by-step instructions would be appreciated.
     
  2. Muazam

    Muazam Administrator Staff Member Admin

    Joined:
    Feb 21, 2010
    Messages:
    2,514
    Your question is "how to add HTML in php?".

    Example: index.php
    Code:
    <?php
    
    echo "homepage";
    
    ?>
    

    Example with html: index.php
    Code:
    <html>
      <head>
        <meta name="description" content="Atlava where pirates sail on lava">
      </head>
      <body>
        <?php echo "homepage"; ?>
      </body>
    </html>
    
    You can also echo every html line out, but I prefer it doing it this way.