What is the best way to create different meta tags on the site through php?

#1

Hello !
What is the best option for creating different meta tags on a site?

#2

html meta tags? why are you using php?

#3

Hello! Soon I’m exploring how to make these meta tags and I did not suppose there was a better way than php. Can you share an alternative with me?

#4

meta tags are part of HTML, which is text, which you can output with echo.

1 Like
#5
<?php printf("this would be where you put the meta tag stuff %s", $someKindOfPhpVar); ?>

I like printf better than echo for the formatting. :wink:
You can use printf to print anything out in html tags or even javascript for that matter.