[PHP] print_r question

2001-08-23 Thread james
When I print an array out with print_r (php 4.06 on IIS 4.0) it does not print newlines even if newlines are embedded in the array element. I must embed br, instead. The manual examples use \n and the output shows that newlines are created. Am I missing something? Newbie, here. Hope this is

Re: [PHP] print_r question

2001-08-23 Thread mike cullerton
one thing i do is put print_r inside pre /pre. function my_print_r($obj) { ?pre? print_r($obj); ?/pre? } does the output from print_r look fine if you view source? mike on 8/23/01 2:58 PM, james at [EMAIL PROTECTED] wrote: When I print an array out with print_r (php

Re: [PHP] print_r question

2001-08-23 Thread Philip Olson
About the simplest way to accomplish what you want is : pre ?php print_r($var) ? /pre \newlines don't show up in browser but will in the source, check your html source and see how pretty it is (full of newlines). Here's an example : $string = a\nb\nc\n; print $string;(newlines in