使用php和html制作视频列表 [英] Make a list of videos using php and html

查看:62
本文介绍了使用php和html制作视频列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

i想要制作像youtube这样的视频列表,但问题是我的代码显示了整行的相同结果

我该怎么办? ?

这是我的代码

 <?php  
while($ row = $ sql-> fetch_array(MYSQLI_ASSOC)){
$ id = $ row [' ID ];
$ image = $ row [' image'];
$ name = $ row [' name'];
?>



 <   tr  >  
< p > < td align = center class = Form-4 > < a href = 。 ./User.php?\" > < img src = ../& lt;?php echo $ image?> height = 150 width = 180 align = < span class =code-keyword> center > < h2 > < / a > <? php echo $ name ?> < / h2 >
< / td > < / p >

< p > < td align = center < span class =code-attribute> class = Form-4 > < a href = ../User.php?\" > < img src = ../& lt;?php echo $ image?> height = 150 width = 180 align = center > < h2 > < / a > <? php echo $ name ?> < / h2 >
< / td > < / p >

< p > < td < span class =code-attribute> align = center class = 表格4 > < a href = ../ User.php? > < img src = ../& lt;?php echo $ image?> height = < span class =code-keyword> 150 width = 180 对齐 = center > < h2 > < / a > <? php echo $ name ?> < / h2 >
< / td < span class =code-keyword>> < / p >

< p > < td < span class =code-attribute> align = center class = 表格4 > < ; a href = ../ User.php? > < img src = ../& lt ;?php echo $ image?> height = 150 width = 180 align = center > < h2 > < / a > <? php echo $姓名 ?> < / h2 >
< / td > < / p >

< p > < TD align = < span class =code-keyword> center class = Form-4 > < a href = ../ User.php? > < img src = ../& lt;?php echo $ image?> 高度 = 150 width = 180 align = center > < h2 > < / a > <? php echo $ name ?> < < span class =code-leadattribute> / h2 >
< < span class =code-leadattribute> / td > < / p >

< / tr >
< ; pre lang < span class =code-keyword> = PHP >
<? php
}
?>





我的尝试:



i试图制作弯管内1 tr内5 td



它显示5 td的相同结果

解决方案

< blockquote> row =


SQL-> fetch_array(MYSQLI_ASSOC)){

ID =

Hello everyone
i want to make a list of videos like youtube but the problem is that my code shows 1 same result to the whole row
what should i do??
this is my code

<?php
while($row = $sql->fetch_array(MYSQLI_ASSOC)){
    $id=$row['id'];
    $image=$row['image'];
    $name=$row['name'];
?>


<tr>
<p><td align="center" class="Form-4"><a href="../User.php?" ><img src="../<?php echo $image ?>" height="150" width="180" align="center"><h2></a><?php echo $name ?></h2>
</td></p>

<p><td align="center" class="Form-4"><a href="../User.php?" ><img src="../<?php echo $image ?>" height="150" width="180" align="center"><h2></a><?php echo $name ?></h2>
</td></p>

<p><td align="center" class="Form-4"><a href="../User.php?" ><img src="../<?php echo $image ?>" height="150" width="180" align="center"><h2></a><?php echo $name ?></h2>
</td></p>

<p><td align="center" class="Form-4"><a href="../User.php?" ><img src="../<?php echo $image ?>" height="150" width="180" align="center"><h2></a><?php echo $name ?></h2>
</td></p>

<p><td align="center" class="Form-4"><a href="../User.php?" ><img src="../<?php echo $image ?>" height="150" width="180" align="center"><h2></a><?php echo $name ?></h2>
</td></p>

</tr>
<pre lang="PHP">
<?php
}
?>



What I have tried:

i have tried to make 5 td inside of 1 tr inside the looper
but
it shows the same result for the 5 td

解决方案

row =


sql->fetch_array(MYSQLI_ASSOC)){


id=


这篇关于使用php和html制作视频列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆