Thanks. As you suggested, here is some code. I went back further than 10 lines.
function getperm($poster)
{
global $forum;
global $forumbody;
$user = $forum[user];
if ($poster == $user)
return('O');
extract($forumbody[adm]);
if (inlist($poster,$hosts))
return('H');
if (inlist($poster,$participants))
return('M');
if (inlist($poster,$moderated))
return('W');
if (inlist($poster,$readonly))
return('R');
return('G');
}
// FIND no IN threadbody[no]
function postindex($no)
{
global $threadbody;
$nums = $threadbody[posts][no];
if (empty($nums))
return(FALSE);
$i = array_search($no,$nums); // SHOULD BE IN ARRAY
if ($i !== FALSE)
return($i);
for ($i=0,$n=count($nums),$k=FALSE; ($i < $n); $i++)
if ($no >= $nums[$i]) // SHOULDN'T FIND EQUAL
{ $k = $i; break; } // FIND CLOSE
return($k);
}
// TOOLBAR FOR POST PAGES
function mkposttoolbar($where='B') // Top/Bottom ASSUME Bottom
{
global $forumid, $forum, $forumbody;
global $threadid, $thread;
global $reader;
global $sub;
global $yourforums;
$forumtitle = $forum['title'];
$threadtitle = $thread['title'];
$readername = ['user'];
@extract($forumbody['adm']);
if (!$toolbarColor) $toolbarColor = '#EEEEEE';
$id = ($threadid) ? $threadid : $forumid;
The 5th line {$user = $forum[user];} used to be {$user = $forum['user'];} producing the same error;
Line 226 {$forumtitle = $forum['title'];} (6th from bottom) produces the error --
( ! ) Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in D:\xampp\htdocs\econcurrent.com\wx\webx\showposts.php on line 226
====
What makes me think the problem is Eclipse and not PHP is that I had a incident a week ago with another module involving single quotes. I had record arrays like $wx = array('id' => $id, 'cd' => 'P', 'user' => $user, ....... ); One of these keys all of a sudden showed up as 'user not 'user'. I tried to add the ' and it wouldn't take it or any other character. Stuff before and after it could be changed.
I discovered the module which was about 6K was now 168K. I cut and pasted the code to EditPad Lite and discovered big chunks of whitespace had been added. I got rid of that and cut and pasted that back to Eclipse and all was OK.
I have developed some code that worked fine. A week ago it stopped working right after Firefox updated itself. Now XDebug doesn't go from page to page properly and variables don't show. And I have been having strange problems that look like PHP problems but I don't think are. I am going to have to tear the code apart into small test cases to isolate this nonsense.