我的代码 -
<?php
//Retrieves data from MySQL
$data = mysql_query("SELECT * FROM employees ORDER BY id DESC") or die(mysql_error());
//Puts it into an array
while($info = mysql_fetch_array( $data ))
{
//Outputs the image and other data
Echo "<img src=http://www.mywebsite.com/upload/".$info['video'] ."> <br>"; //This is the name of my Video URL in MySQL
Echo "<b>Video</b> ".$info['Video'] . "<br> "; //This is the name of my Video Name in MySQL
Echo "<b>Author</b> ".$info['Author'] . "<br> "; //This is the name of my USER in MySQL
Echo "<b>Category</b> ".$info['category'] . "<br> "; //This is the name of Video Category in MySQL
Echo "<b>Description</b> ".$info['Description'] . "<hr>"; //This is the name of Description in MySQL
}
?>
作为原始输出,详细信息将像这样出现在 List 中 -
Image1
Video name1
Author name1
Category1
Description1
<hr>
Image2
Video name2
Author name2
Category2
Description2
现在想<div>
在图像、作者、视频名称之间添加标签和标签
我怎么能放?因为当我编辑“ <br>
”并插入“ <div class="thumb"></div><br>
”时
它显示错误!- 解析错误:语法错误,意外的 T_STRING,期待 ',' 或 ';' 在第 14 行的 /home/servin/public_html/upload/view.php
我如何编辑 mysql php 代码以便我可以添加 html 代码 + 所有详细信息也必须像这样显示