get_meta_tags
get_meta_tags
get_meta_tags
- It extracts all meta tag content attributes from a file
and returns an array.
Syntax:
array get_meta_tags ( string filename [, int use_include_path])
It opens filename and parses it line by line for <meta>
tags of the form <meta name=”author” content=”name”>.
Example:
$result = get_meta_tags (”test.html”);
print_r($result);
content in “test.html”
<html>
<head>
<meta name=”keyword” content=”PHP”>
<meta name=”description” content=”PHP5 Manual”>
</head>
<body>
PHP 5
</body>
</html>
The output in $result is
Array
(
[keyword] => PHP
[description] => PHP5 Manual
)
