PHP code example of cosmos / metatag

1. Go to this page and download the library: Download cosmos/metatag library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

cosmos / metatag example snippets

 php

use Cosmos\MetaTag\MetaTag;

$data = [
  'description' => "A helper class for making html meta tag.",
  'author' => 'John',
  'keywords' => ['PHP', 'Composer', 'Code', 'Github']
];

$metaTag = new MetaTag($data);

echo $metaTag->display();
// <meta property="description" content="A helper class for making html meta tag.">
// <meta property="author" content="John">
// <meta property="keywords" content="PHP,Composer,Code,Github">