The question is the tag <pre> </pre>
I've seen one script I am working on, uses it:
echo ("<pre>");
.... ....
echo ("</pre>");
What exactly does it do ?
Is it an Html tag or a PHP ?
I've searched on Google but nothing much comes out of it. When do we usually use that HTML tag?...or PHP tag?
The PHP function echo() prints out its input to the web server response. echo("Hello World!"); prints out Hello World! to the web server response. echo("<prev>"); prints out the tag to the web server response.
The echo() function outputs one or more strings. Note: The echo() function is not actually a function, so you are not required to use parentheses with it. However, if you want to pass more than one parameter to echo(), using parentheses will generate a parse error.
Echo simply outputs the strings that it is given, if viewing in the browser it will output the strings to the browser, if it's through command line then it will output the strings to the command line. In index. php and backend.
The <pre> HTML element represents preformatted text which is to be presented exactly as written in the HTML file.
The <prev>
tag doesn't exist, but it's probably the <pre>
HTML tag to put around debug output, to improve readability. It's not a secret PHP hack. :)
I think you're talking about <pre></pre>
. element is displayed in a fixed-width font, and it preserves both spaces and line breaks.
try printing an array with a **<pre>**
and whitout **<pre>**
$arr = array(1, 2, 3); echo '<pre>'; print_r($arr); echo '</pre>'; print_r($arr);
echo ("");
is a php code, and <prev>
tries to be HTML, but isn't.
As @pekka said, its probably supposed to be <pre>
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