doutouhe5343 2012-06-27 16:05
浏览 9

PHP中的if if语句。 没有重复

I have a database run by the gigpress Wordpress plugin.

This links to a related wordpress post, that will then display related dates(infinite number) and venues(5 venues).

I have successfully filtered the data by venue and wrapped the output in a div...

<div class="gigpress-related-park"> 
<?php if ( $showdata['venue'] == "VENUENAME" ) 
{echo "<div class=\"gigpress-related-item\">"; 
echo $showdata['date_long']; echo $showdata['venue']; 
echo "</div>"; } ?>
</div>

What I need to do, is create a div(vertical column) for each venue, then display the dates in that div. But when ever I try to wrap the above php in a div, the div is just repeated along with the output.

Sorry I am being vague I have no other way to word my issue.

Live examples. http://www.gocompletely.com/toni-warne/ <- This event has one venue, should appear in a column. http://www.gocompletely.com/best-of-british-wrestling/ <-This event is at multiple venues, does not fit columns only floats left.

Thanks! Let me know if I need to provide any more details I will do my best to do so.

EDIT More info I need the code above to result in the below:

<div class="gigpress-related-park">
<div class="gigpress-related-item">
1st July, 2012Southport
2nd July, 2012Southport
3rd July, 2012Southport
</div>
</div>
<div class="gigpress-related-park">
<div class="gigpress-related-item">
1st July, 2012Brean Sands
2nd July, 2012Brean Sands
3rd July, 2012Brean Sands
</div>
</div>

I hope that makes more sense.

  • 写回答

2条回答 默认 最新

  • dpsyssiv90846 2012-06-27 16:17
    关注

    There is an effective float on: .gigpress-related-park I guess that removing it should fix the problem.

    Also make sure you clear all floats since thats the most common mistake.

    评论

报告相同问题?

悬赏问题

  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端
  • ¥15 基于PLC的三轴机械手程序
  • ¥15 多址通信方式的抗噪声性能和系统容量对比
  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作