作为一个小组发现的结果,我得到了类似的东西
id name date project
2898 Noemi Araceli Farre Gutierrez 2012-07-23 mr12249-Northgate Field
2898 Noemi Araceli Farre Gutierrez 2012-07-24 mr12251-Marketon Field
2898 Noemi Araceli Farre Gutierrez 2012-07-25 mr12251-Marketon Field
2898 Noemi Araceli Farre Gutierrez 2012-07-26 mr12249-Northgate Field
3047 Mauricio Javier García 2012-07-22 mr12249-Northgate Field
3047 Mauricio Javier García 2012-07-23 mr12251-Marketon Field
3047 Mauricio Javier García 2012-07-26 mr12251-Marketon Field
在我看来,我需要避免重复 id 和 name,并显示如下:
id name date project
2898 Noemi Araceli Farre Gutierrez 2012-07-23 mr12249-Northgate Field
2012-07-24 mr12251-Marketon Field
2012-07-25 mr12251-Marketon Field
2012-07-26 mr12249-Northgate Field
3047 Mauricio Javier García 2012-07-22 mr12249-Northgate Field
2012-07-23 mr12251-Marketon Field
2012-07-26 mr12251-Marketon Field
我可以通过比较视图中 foreach 循环期间的当前值和先前值来做到这一点,但在我看来,必须有更好的蛋糕方式。