while(fetching){
if($x != $y){
echo "<div> Something </div>
<div>";
}
$x = $y;
echo "<div> Something Else </div>";
if($x != $y) {echo "</div>";} //The Problem Here
}
在我这里代码内的元件,我无法关闭我的元件在所有的,在所有的末端之上的元素组合在彼此内部和所述元件在所有的结束时关闭它,我该如何解决这个问题?我试图去结束while循环
if($x != $y){
echo "<div> Something </div>
<div>}
$x = $y;
echo "<div> Something Else </div>";
}
if($x != $y) {</div>";}
但也没有工作。
我想要做到的是
<div> Something </div>
<div>
<div> Something Else </div>
<div> Something Else </div>
</div>
<div> Something </div>
<div>
<div> Something Else </div>
<div> Something Else </div>
</div>
什么总是会发生的是
<div> Something </div>
<div>
<div> Something Else </div>
<div> Something Else </div>
<div> Something </div>
<div>
<div> Something Else </div>
<div> Something Else </div>
</div>
</div>
请解释你正在努力完成的事情。 – FirstOne
@FirstOne现在编辑了这个问题。 –
'$ x = $ y;'然后,'if($ x!= $ y)'后面2行,这个'if'永远不会执行。 –