解析错误:语法错误,意外的'id' (T_STRING), expect ','或';in C:\xampp\htdocs\strona\search。第64行中的php [duplicate]

时间:2021-07-22 22:46:40

This question already has an answer here:

这个问题已经有了答案:

    while ($line = mysql_fetch_array($wynik))
      {
         echo "<tr>
               <td align=\"center\">".$line['id']."</td> 
               <td align=\"left\">".$line['imie']."</td>
               <td align=\"left\">".$line['imie_drugie']."</td>
               <td align=\"left\">".$line['nazwisko']."</td>
               <td align=\"center\">".$line['data_ur']."</td>
               <td align=\"center\">".$line['plec']."</td>
               <td align=\"center\">".$line['wiek']."</td>
               <td align=\"center\">".$line['knazwa']."</td>
               </tr>";
      }

Start line is 61. Last line is line 73. Thanks for help!

开始线是61。最后一行是第73行。谢谢你的帮助!

2 个解决方案

#1


0  

Use echo at the beginning of each line and ' (single quotes) as start and end - then in the middle You can use " (double quotes).

在每行开头使用echo和'(单引号)作为开头和结尾,然后在中间使用"(双引号)。

Check this:

检查:

echo '<td align="center">'.$line['id'].'</td>';

#2


0  

 echo "<tr>
         <td align='center'>".$line['id']."</td> 
         <td align='left'>".$line['imie']."</td>
         <td align='left'>".$line['imie_drugie']."</td>
         <td align='left'>".$line['nazwisko']."</td>
         <td align='center'>".$line['data_ur']."</td>
         <td align='center'>".$line['plec']."</td>
         <td align='center'>".$line['wiek']."</td>
         <td align='center'>".$line['knazwa']."</td>
       </tr>";

#1


0  

Use echo at the beginning of each line and ' (single quotes) as start and end - then in the middle You can use " (double quotes).

在每行开头使用echo和'(单引号)作为开头和结尾,然后在中间使用"(双引号)。

Check this:

检查:

echo '<td align="center">'.$line['id'].'</td>';

#2


0  

 echo "<tr>
         <td align='center'>".$line['id']."</td> 
         <td align='left'>".$line['imie']."</td>
         <td align='left'>".$line['imie_drugie']."</td>
         <td align='left'>".$line['nazwisko']."</td>
         <td align='center'>".$line['data_ur']."</td>
         <td align='center'>".$line['plec']."</td>
         <td align='center'>".$line['wiek']."</td>
         <td align='center'>".$line['knazwa']."</td>
       </tr>";