Jump to content

[SOLVED] Meta Tags


MasterACE14

Recommended Posts

Can you create a meta tag and put it in a variable like this:

 

<?php
$meta = '<meta name = "creator" 
	content = "ACE" >
<meta name = "keywords"
	content = "Online,MMORPG,game,fun,crazy,roleplay" >
<meta name = "description"
	content = "Conflicting Forces is a MMORPG" >
<meta http-equiv = "Content-Type"
	content = "text/html; charset = ISO-8859-1" >

<style type = "text/css" >
body { background-color: black; color:white }
</style>';
?>

 

and then on another page include("metatag.php"); and will that set the pages meta tag on that page?

 

Regards ACE

Link to comment
https://forums.phpfreaks.com/topic/58193-solved-meta-tags/
Share on other sites

yes

 

create a file meta.php

like this

<?php

$meta = '<meta name = "creator"

content = "ACE" >

<meta name = "keywords"

content = "Online,MMORPG,game,fun,crazy,roleplay" >

<meta name = "description"

content = "Conflicting Forces is a MMORPG" >

<meta http-equiv = "Content-Type"

content = "text/html; charset = ISO-8859-1" >

 

<style type = "text/css" >

body { background-color: black; color:white }

</style>';

echo $meta;

?>

 

Then inculde like this

 

include_once ('meta.php');

Link to comment
https://forums.phpfreaks.com/topic/58193-solved-meta-tags/#findComment-288618
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.