The following code obtains lists of files from two different directories and reverse 
numerically sorts them.  Then bellow it takes one file and dumps the contents into an 
array, which works fine.  The problem is where it takes the entire content of the 
matching file from the second directory and tries to put it into $entry.  It returns a 
parse error on line 67, which is the line I marked.  What should I do to fix this?  

Thanks a lot to you guys by the way for help with all of my problems.  I'm a 16 
year-old trying to create a weblog system using PHP (a new language to me) over summer 
vacation for fun.

<?php 

$postInfo = opendir('postInfo');
while (false !== ($filename = readdir($postInfo))) {
        $infoFiles[] = $filename;
}
closedir($postInfo);
rsort($infoFiles, SORT_NUMERIC);
array_splice($infoFiles, 0, 2);

$postEntries = opendir('postEntries');
while (false !== ($filename = readdir($postEntries))) {
        $entriesFiles[] = $filename;
}
closedir($postEntries);
rsort($entriesFiles, SORT_NUMERIC);
array_splice($entriesFiles, 0, 2);

$curr = 0;
foreach ($infoFiles as $infoIndex) {
        foreach ($entriesFiles as $entriesIndex) {
                $infoRaw = file("postInfo/{$infoindex}");
                $entryGet = fopen("postEntries/{$entriesIndex}", 'r');
                $entry = fread($entryGet, filesize("postEntries/{$entriesIndex}"); 
//67, line /w parse error
                fclose($entryGet);
?>


--
Kyle

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to