Re: Heredocs, print_r() and newline "\n" and fnmatch() -curious failures ...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Peter Lind wrote:
On 23 September 2010 21:47, YAD(YetAnotherDavid) <animaz@xxxxxxxx> wrote:
This code is 95% cut and paste from the PHP manual examples -
the Types/Strings/Heredocs section and the Filesystem/fnmatch pages.
There are actually two questions here - I have combined the code into one
 ...

Question 1 : how to get the newline functioning ....? even print_r() output
is not 'newlined' as it should be. Also note the \n is missing between the "
" in the output text of the second test!


Are you outputting to browser or to command line? Browsers have a
habit of ignoring whitespaces, reducing them to one whitespace
character regardless of their type or how many.

Regards
Peter


Thanks Peter, - output is to browser, I develop in Notepad++ and Firefox, and confirm in IE8. But this stuff used to work - I have been working with PHP for about two years (not pro) and am used to formatting my output for legibility - especially echoing or var_dumping variables when still testing the code. So the failure is recent and I just can't figure what changed.
David

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux