Answers for "php _n"

PHP
0

php print array new line

//Tell the browser it's not an HTML document, but a text, by placing the following code before any output is sent
header('Content-type: text/plain');

echo "<pre>".print_r($array)."</pre>";
Posted by: Guest on August-11-2021
0

php why "\n" not new line

if "test\n" not return, new line
  1st solution:echo "test".PHP_EOL;
  2nd solution:<?php header('Content-type: text/plain'); ?>
  3rd solution:"<br />" instead of "\n" or "\r\n"
Posted by: Guest on July-13-2021

Browse Popular Code Answers by Language