• Techblog369, India
  • March 28, 2023

How To Configure A Sendinblue SMTP Relay in Postfix?

Fix Email Issues in CyberPanel with SMTP Relay Setup Free Method. First Create a email using your Cyberpanel Under Emai Tab Create Email Second go to the SSL tab and click …

Create a simple password strength indicator with JavaScript

You’ve probably seen many examples of password strength indicators around the web. They let users know the password they’re using is weak and indicate how the strength changes when it’s modified. …

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

nw.ippm@gmail.com

Leave a Reply

Your email address will not be published. Required fields are marked *