• Techblog369, India
  • August 17, 2022

How to create PHP QR code and Save it to Database?

Hi In this Article I am going to show how to create QR code and save it to database also fetch QR Code in a Table Create a Page addqrcode.php in …

How to Send Multiple Files Attachment Mail using Laravel

Hi in this article i am going to show how to send multiple files attachment mail in Laravel. It’s simple example of Laravel send multiple attachment in mail. I explained simply …

Adding multiple white areas and line breaks in PHP code is vital for data format and displaying text properly on an online page. Strings from alternative software system is also victimisation totally different spacing characters and wish to be born-again to HTML tags. sadly, some pc architectures use totally different spacing characters than others. making areas in PHP is completed principally through the “echo” perform.

Step 1

Open the PHP file in a text editor, such as Windows Notepad.

Step 2

Add a single space between PHP variables by adding the code “echo $variable1 .” “. $variable2;.”

Step 3

Add multiple spaces by adding the code “echo $variable1 .”  “. $variable2;.” The ” ” entity represents a non-breaking space. Using ” ” frequently doesn’t work because web browsers collapse multiple spaces into one.

Step 4

Add a space as a line break with the code “echo “\r\n””, “echo ”
“” or “echo “\n”.” The “\n” character represents a new line and the “\r” character represents a carriage return.

Step 5

Call the PHP “nl2br” function to replace every “\r”, “\n”, “\n\r” and “\r\n” entity in a string with an HTML line break, ” ” or ”
“, by adding the code “echo nl2br(“line1\nline2″);.” This will output “line1 ” and then “” on the next line.

Step 6

Save the PHP file, close it and then load it on your server.

  is used for adding space in html and php

You can add   html in between name and profession

$spName .= $row['firstname'];
            $spPro = $row['profession'];

            $options .= '<option value='. $spName . '' . $spPro .'>' . $row['firstname'] . '&nbsp; ' . $row['lastname'] . ' - ' . $row['profession'] . '</option>';
            // or i could also do it this way.                                                                                                              
            $options .= '<option value='. $row['firstname'] . '&nbsp;' . $row['profession'] .'>' . $row['firstname'] . ' ' . $row['lastname'] . ' - ' . $row['profession'] . '</option>';

Author

admin@techblog369.in

Leave a Reply

Your email address will not be published.