#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    3
    Rep Power
    0

    Print_r wordwrap


    is it possible to disable what appears to be a wordwrap when using print_r
  2. #2
  3. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,295
    Rep Power
    9400
    print_r() does not wordwrap. What do you mean?

    But it shouldn't matter because the function is only for debugging purposes.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    3
    Rep Power
    0
    i don't believe it is a browser issue, I've put a long string of x's and they continue far beyond the limits of my screens width(giving me a horizontal scroll)

    however with print_r the output begins a new line once the total width of the string reaches near my screens width with the exception of if there being a full word that would be longer than the remaining space then it appears on the next line

    despite having a horizontal scroll bar (from the string of x's) the output from print_r still behaves in the same fashion conforming to some invisible constraint that i can only describe as a word wrap

    if i zoom out some of the text will appear on the line above it to fill in the gap created by the increased screen size
  6. #4
  7. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,295
    Rep Power
    9400
    print_r() outputs the exact contents of whatever you gave it to print. It will not add HTML, but if the contents include HTML that will be outputted normally and will be interpreted as HTML. Could that have anything to do with this?
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    3
    Rep Power
    0
    there is no HTML it is only a php script hosted on a server and loaded threw a web browser (firefox and IE behave the same way)
  10. #6
  11. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,295
    Rep Power
    9400
    What does View Source show for the page, or at least the particular part of the page where the dump is? And where in the dump is it wrapping?

IMN logo majestic logo threadwatch logo seochat tools logo