Help Me/Question How To Add Meta Tag In Php ?

Brillmindz

New Member
get_meta_tags

get_meta_tags — Extracts all meta tag content attributes from a file and returns an array

Regards
Robert
Brillmindz Technologies Pvt Ltd
 

ajsahi

Active Member
you have to use yoast SEO, i think this is the best tool to get batter SEO optimization with meta tags
 

Theomax

Member
Here is the PHP for the variables


<?php

$tpTitle="Helping you to improve your web site";

$pgHeading="Site-Report.com - Helping you to improve your web site";

$pgDesc="Helping you to improve your web site";

$pgKeywords="site-report";

?>
 

David Paul

New Member
The major search engines recommend that each page on your site has a unique title and meta description. This can easily be achieved with php if you have data stored somewhere to populate those tags.

In your html template you may have something like:-

<link rel="stylesheet" type="text/css" href="css/style.css">
<title><?php echo $title ?></title>
<meta name="description" content="<?php echo $description ?>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name=viewport content="width=device-width, initial-scale=1">
 
Top