I am new to php and trying to do this:
<html>
<body>
<?php
echo 'Welcome'.$_GET['name'];
?>
</body>
</html>
This is my php code which displays my name entered by using a html form. When submit button is pressed I get this output :- WelcomeNick Watterson
But I am trying to add space between Welcome and Nick. How can I do this in this code?
use the below code
<?php
echo 'Welcome '.$_GET['name'];
?>
is the html entity code for creating an single space character.
You can also use the below code:
<?php
echo 'Welcome '.$_GET['name'];
?>
Will also work because one empty space is interpreted by the browsers directly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With