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


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


html meta tags? why are you using php?


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?


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

1 Like
<?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.