嗨,变量中有一些代码,在 Ben Rowe 的帮助下,我设法意识到我需要连接我的字符串,现在我似乎无法解决以下问题......在变量中包含 if 和 else。我有以下 IF/ELSE 不起作用的代码,如果有人能提供帮助,我将不胜感激。
<?php if (!$logged) { ?>
<div id="payment-address">
<div class="checkout-heading"><span>'.$text_checkout_account.'</span></div>
<div class="checkout-content"></div>
</div>
<?php } else { ?>
<div id="payment-address">
<div class="checkout-heading"><span>'.$text_checkout_payment_address.'</span></div>
<div class="checkout-content"></div>
</div>
<?php } ?>
<?php if ($shipping_required) { ?>
<div id="shipping-address">
<div class="checkout-heading">'.$text_checkout_shipping_address.'</div>
<div class="checkout-content"></div>
</div>
<div id="shipping-method">
<div class="checkout-heading">'.$text_checkout_shipping_method.'</div>
<div class="checkout-content"></div>
</div>
<?php } ?>
<div id="payment-method">
<div class="checkout-heading">'.$text_checkout_payment_method.'</div>
<div class="checkout-content"></div>
</div>
<div id="confirm">
<div class="checkout-heading">'.$text_checkout_confirm.'</div>
<div class="checkout-content"></div>
</div>
我尝试剥离PHP标签无效,我还尝试在以下代码之前关闭php然后再次打开它但仍然没有结果:(