Thank you to those of you who helped me with my last problem earlier today.
Now I have a text file (setup.txt) that has a series of values all seperated by
\r\n's. Inside of another file I'm trying to read setup.txt into $rawSetupData and
explode that with \r\n's into an array called $setupData. My problem is that the
explode function doesn't seem to be doing anything, and neither is split which I tried
also. Here is my code:
setup.txt
***
John\'s X Log
10
5
example.com
treeclimber56
ab3c45def
***
test.php
***
<?php
if (file_exists("setup.txt")) {
$rawSetupData = readfile("setup.txt");
$setupData = explode("\r\n", $rawSetupData);
echo $setupData[0];
}
else echo "Error opening \"setup.txt\"";
?>
***
Actual results of running test.php
***
John\'s X Log 10 5 example.com treeclimber56 ab3c45def 61
***
Desired reults of running test.php
***
John's X Log
***
Other problem:
In the actual results of running test.php where is the 61 coming from?
Thank you,
--
Kyle
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php