View Full Version : Entire HTML source stripped to one line

05-05-2006, 05:30 PM
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?

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

05-05-2006, 05:41 PM
Nevermind... :) Just got it solved using a
str_replace("\n", "", $thing);