php - How to use PHP_EOL without \n and br -


i tried use php_eol without \n , <br/> .but getting output same line.it's not going new line.my php version 5.5 . i'm not echo inside function used return .i tried both of these.but same problem.this example tried.

trait footest {     public function sayfoo()     {         return "i 'a'm saying foo trait".php_eol;     } }   trait bartest {     public function saybar()     {         return "i 'm saying bar trait".php_eol ;      } }  class traittest {     use footest,bartest;      private $property = " hello there ";      public function getval()     {         return $this->property ;     } }  $trait = new traittest;  print $trait->getval(); print $trait->sayfoo(); print $trait->saybar(); 

your code works fine, right click browser , select 'view source' , see raw output, complete line breaks

if want see line breaks in browser, need use html (eg <p> or <br> tags)


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -