Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Entire HTML source stripped to one line

    I got this JavaScript function, which need all the text I wants as input to be on one line

    The []'s need to be on the same line for it to work.

    The input is a PHP variable, which is a file_get_contents from another site. So PHP makes my $thing multiple lines. How can I make it just one line, so that the []'s are on the same line?

    Code:
    Thing[0] = [<?php print($thing); ?>]

  • #2
    New to the CF scene
    Join Date
    May 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Nevermind... Just got it solved using a
    Code:
    str_replace("\n", "", $thing);


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •