$file = file("test.xml"); foreach ($file as $line) { $js .= "xml += \"".trim($line)."\";\n"; } ?> Go Go Gadget!