我的PHP代码在哪里出错?

'.{$row['MemberName']}.'';?>

";?>

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in C:\xampp\htdocs\home - Copy\membercopy.php on line 141

I really don't know where it went wrong. Please help,

<?php 

   echo '<label onclick="window.open('profilephp.php?member=$row['MemberID']','mywindow')">'{$row['MemberName']}.'</label>';

?>

If you look at that line, you'll see you have your single quoted string with single quotes inside it. Also, you're trying to use variables inside a single quoted string, which doesn't work. You want to change this to:

   echo "<label onclick=\"window.open('profilephp.php?member={$row['MemberID']}','mywindow')\">'{$row['MemberName']}.'</label>";

Notice I've double quoted your string and then escaped, with a backslash, any double quotes inside the quoted string.

I also added {} around the first complex variable in the string, since it will give you an error without it.

This fixes most of the problems with your code (and it's even readable!):

<td style="text-align: center; background-color: #FFFFFF;">
   <label onclick="window.open('profilephp.php?member=<?php=$row['MemberID']?>','mywindow')">
      <?php=$row['MemberName']?>
   </label>
   <br />
   <img src="<?php=$row['MemberImg']?>" width="100" height="100" alt="" />
</td>

The error are the non-escaped single quotation marks and the bracets. You write this:

<?php echo '<label onclick="window.open('profilephp.php?member=$row['MemberID']','mywindow')">'.{$row['MemberName']}.'</label>';?>

but is has to look like this:

<?php echo '<label onclick="window.open(\'profilephp.php?member='.$row['MemberID'].'\',\'mywindow\')">'.$row['MemberName'].'</label>';?>

I hope that is what you needed.