There is a tag:
<br />
Ok, but why double quotes and dot before first quote are needed with br in php, when in HTML there is only <br />
? :)
For example:
echo $variable1."<br />";
echo $variable2;
That's an echo statement with a concatenated string. You can use just a regular old <br>
, but you have to put it as HTML outside of the PHP tags (<?php ?>
).
These are all valid in a PHP file:
<?php ?>
<br>
<!--This one is specifically to show that a regular br has to be
outside of the php tags.-->
<?php
echo "<br>";
?>
<?php
echo $var."<br>";
?>
Double Quote
Dot
` to the variable1 that you're echoing. – aynber Dec 28 '20 at 17:35