Skip to content
Advertisement

In PHP how would i output my variable in a tag instead of echo? [closed]

I want to change an echo (from PHP) to a <p> tag, so that I can use CSS in my text.

Advertisement

Answer

You can just add the string literal <p> between the variable:

echo '<p>' . $my_var . '</p>';
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement