Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?
Closed 5 years ago.
Improve this question<?php while($row = $result->fetch_assoc()); ?>
<tr>
<td><?php echo $row['name']; ?></td>
<td><?php echo $row['location']; ?></td>
<td></td>
</tr>
<?php endwhile; ?>
Closed. This question is off-topic. It is not currently accepting answers.syntax error, unexpected 'endwhile' (T_ENDWHILE), expecting end of file emphasized text
Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?
Closed 5 years ago.
Improve this question<?php while($row = $result->fetch_assoc()); ?>
<tr>
<td><?php echo $row['name']; ?></td>
<td><?php echo $row['location']; ?></td>
<td></td>
</tr>
<?php endwhile; ?>
Share Improve this question edited Oct 9, 2019 at 10:21 nmr 4,5672 gold badges17 silver badges25 bronze badges asked Oct 9, 2019 at 9:08 ArtisanGeeArtisanGee 1syntax error, unexpected 'endwhile' (T_ENDWHILE), expecting end of file emphasized text
1 Answer
Reset to default 1in while($row = $result->fetch_assoc());
semicolon occored issue. replace ;
with :
<?php while($row = $result->fetch_assoc()): ?>
<tr>
<td><?php echo $row['name']; ?></td>
<td><?php echo $row['location']; ?></td>
<td></td>
</tr>
<?php endwhile; ?>
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745096695a4611022.html
评论列表(0条)