/ LJCPHPCodeDoc / LJCHTMLLib / LJCHTML / GetMetas


Parameters
$author - The author.
$textState - The current text state values.
$description - The description.
$keywords - The keywords.
$charSet - The charset value.

Returns

The <meta> elements.

Syntax

PHP
public static function GetMetas(string $author, LJCTextState $textState
, string $description = null, string $keywords = null
, string $charSet = "utf-8") : string

Gets common meta elements.

Example

PHP
 // Gets common  elements.
 private static function GetMetas()
 {
   // Root Method Begin
   $textState = new LJCTextState();
 
   // Example Method:
   $result = LJCHTML::GetMetas("John Q. Smith", $textState, "A description.");
 
   // result:
   // <meta charset="utf-8" />
   // <meta name="description" content="The Description" />
   // <meta name="author" content="Johm Q. Smith" />
   // <meta name="viewport" content="width=device-width initial-scale=1" />
 }

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.