I am using this code but it is giving me errors. How do I display the images in a table using php?
我使用了这个代码,但是它给了我错误。如何使用php在表中显示图像?
echo “<td>”.<img src=\”=View.php?image_id=$row[’Id’]>”.”</td>”;
I am getting a syntax error, how can I fix this?
我有一个语法错误,我怎么解决这个?
Thank You
谢谢你!
1 个解决方案
#1
2
You are using wrong double quotes, wrong single quotes and you are missing to escape one double quote and missing also a double quote in concatenation, so change to
你使用的是错误的双引号,错误的单引号,你丢失了一个双引号,并且丢失了一个双引号连接,所以改成。
echo "<td>"."<img src=\"=View.php?image_id=$row['Id']>\""."</td>";
#1
2
You are using wrong double quotes, wrong single quotes and you are missing to escape one double quote and missing also a double quote in concatenation, so change to
你使用的是错误的双引号,错误的单引号,你丢失了一个双引号,并且丢失了一个双引号连接,所以改成。
echo "<td>"."<img src=\"=View.php?image_id=$row['Id']>\""."</td>";