I've following PHP code:
<!DOCTYPE html>
<html>
<body>
<?php
echo "<h2>PHP is Fun!</h2>";
echo "Hello world!<br>";
?>
</body>
</html>
I'm not understanding why without adding <br> at the end of first echo statement the next echo statement printing the data on a new line?
The same is not happening in below example :
<!DOCTYPE html>
<html>
<body>
<?php
echo "Jumbo";
echo "Hello world!<br>";
?>
</body>
</html>
I'm getting the output as JumboHello world!
Why so? I mean at one place echo takes new line charcter before start printing the text and at another place it's not.
Please clear the concept to me in detail manner.
Thanks.
Aucun commentaire:
Enregistrer un commentaire