Php 如何将数据库中的动态图像添加到html表格中?我有错误

Php 如何将数据库中的动态图像添加到html表格中?我有错误,php,html,css,html-table,Php,Html,Css,Html Table,我进入表格数据,我得到了所有的数据,但图像没有检索我有上传文件夹,其中有所有存储图像下面是我的代码 <td>'.$row['picture'].'</td> 。$row['picture'] 这张图片只能得到url,但我如何才能得到与实际图像 <?php $query=$conn->query("select * from missing"); $sn=0; while($row=$query->

我进入表格数据,我得到了所有的数据,但图像没有检索我有上传文件夹,其中有所有存储图像下面是我的代码

<td>'.$row['picture'].'</td>
。$row['picture']
这张图片只能得到url,但我如何才能得到与实际图像

   <?php
     $query=$conn->query("select * from missing");
     $sn=0;
     while($row=$query->fetch_array())
     {
     $sn++;
      echo '<tr>
      <td>'.$sn.'</td>
      <td>'.$row['name'].'</td>
      <td>'.$row['father_name'].'</td>

      <td>'.$row['age'].'</td>
      <td>'.$row['color'].'</td>
      <td>'.$row['height'].'</td>
      <td>'.$row['gender'].'</td>
      <td>'.$row['district_id'].'</td>
      <td>'.$row['description'].'</td>
      <td>'.$row['address'].'</td>
      <td>'.$row['missing_date'].'</td>
      <td>'.$row['picture'].'</td>
      <td>'.$row['status'].'</td>

      <td><a href="function.php?type=deleteuser&userid='.$row['id'].'"<i class="fa fa-trash" aria- 
      hidden="true"></i></a></td>

      <td><a href="function.php?type=deleteuser&userid='.$row['id'].'"<i class="fa fa-edit" aria- 
       hidden="true"></i></a></td>

       </tr>
      ';
      }
       ?>
  

您需要使用HTML
img
标记来显示图像

适用于初学者。
我看到了一些其他的问题,但你显然是个初学者,我不会责备你的…

如果你想显示多个图像,你可以使用多对多关系。。。 必须有一个包含图像信息的表,第二个表包含图像名称,第三个表仅存储id。然后选择图像和循环抛出ID

使用**
use **<img>** tag 

ie,
<td><img src=path_to_image_folder/'.$row['picture'].'></td>

现在我通过这段代码成功地从数据库添加了图像

<td><img src='.$row['picture'].'></td>

但是当我检查图像时,文件路径不正确

分析错误:语法错误,意外的'src'(T_字符串),应为';'或者,在C:\xampp\htdocs\missing\u person\user\all\u missing\u person.php的第77行中,将包含img的整行代码张贴出来。您在错误的地方有一个引号,这个错误意味着PHP试图将HTML视为PHP代码。。事实上,主要原因是在php标记中,当我将其显示为erroreverything时,都有原因,因此最好在答案中添加一些描述,并解释答案。