mjlogan Posted December 7, 2006 Share Posted December 7, 2006 Hi,I can think of the actualy terms to search for this, but I have tried, just not found the right thing.at the moment I have the code[code]<?php$fh = fopen($myFile, 'w') or die("can't open file");unset($stringData);$stringData = "";$stringData = $stringData. "<?php\n\n$lstJobTypeOptions = \"";...$stringData = $stringData. "\n\n?>";fwrite($fh, $stringData);fclose($fh);?>[/code]which out puts in the file[code]<?php = "?>[/code]with the errorNotice: Undefined variable: lstJobTypeOptions ...................................How do I get the script to acutally just write [code]<?php$lstJobTypeOptions = "?>[/code]Thanks, lol its beginning to annoy me :-\Edit:Resolved, using ' instread of " Link to comment https://forums.phpfreaks.com/topic/29789-writing-to-file-simple-problem/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.