answersLogoWhite

0

How do you make a line break in PHP?

User Avatar

Anonymous

13y ago
Updated: 8/20/2019

In PHP, you can create a Windows-style CRLF line break using the string "\r\n". However, it is usually sufficient, easier to handle, and sometimes even necessary to omit the CR, meaning that you can just use "\n". Although the line break will just count as white space for HTML (use can echo "<br>" to create a line break in HTML), it is useful for <pre>formatted text, textareas, or for outputting a formatted non-HTML text response.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

How can you execute a PHP script using command line?

2 Methods: 1. You execute your php binary (in linux, make sure you have php-cli installed) and pass the script as an argument. EG ($: /usr/bin/php /home/user/script.php) 2. A sh'bang in the first line of your script, with the full path of your php executable: #!/usr/bin/php -q &lt;?php ScriptStuff(); ?&gt;


What is syntax in php?

We can use php tags in different ways. &lt;?php //php code to be written here ?&gt; OR &lt;? //php code ?&gt; This tag will not work when we using editors such as macromedia dreamweaver. OR &lt; script language="php"&gt; //php code &lt;/script&gt;


How do you make the squiggly line for a graph break?

/\/\/\/\/\/\/\/\/\/\/\/\/\/\ is the line


How does PHP work?

PHP is a programming language that stands for PHP Hypetextual Processing (recursive acronym). Technically PHP is just a program that lives on your computer which interprets code and executes PHP statements line by line. The PHP interpreter will execute changes to your computer or run-time environment based on the low-level instructions that the programmer issues.


What is the getopt function in PHP?

It gets options from the command line argument list. It can be used in PHP 4.3 and above, including PHP 5.


How do you give href toanother php page?

Here is the code below to redirect a webpage using php: &lt;?php header('Location: url of the webpage'); // example: header('Location: index.php') exit; // exit after redirection is very important as php executes code line by line ?&gt;


How do you leave comment on php code?

There are 3 styles of PHP comments // comment a single line # comment a single line (perl-style /* comment block */


What is a pause or break in the middle of a line of verse?

You can make a break in the line in HTML by placing in BR tag. It moves whatever is being written to the next line.


How do you write coding php using switch case?

The case structure in PHP uses the following syntax: switch($foo){ case 'bar': doSomething(); break; case 'blah': doSomethingElse(); break; default: handleOtherCases(); }


How can you make a PHP form in HTML and submit without using a php file or email?

To submit a file, you don't even need a PHP file. The PHP portion is for processing the form results. You just make a button and make sure you defined the action URL.Name: Gender:Boy: Girl:


How do you make a search engine in PHP?

Yes you can make a search engine in php it works pretty good i built one my self


What line is added to the Apache configuration file to ensure that PHP extensions are recognized?

Adding the following lines to the Apache 2.x configuration file will associate .php files with PHP, given the PHP 5 module (DLL file) is also loaded through the configuration: &lt;FilesMatch \.php$&gt; SetHandler application/x-httpd-php &lt;/FilesMatch&gt;